![]() |
NikosAssets.Instantiation 0.1.0
|
Defines a contract for instantiating Unity Objects in an async manner. More...
Public Member Functions | |
| Task< TObject > | CreateInstanceAsync (Transform parent=null, bool worldPositionStays=false) |
| Task< TObject > | CreateInstanceAsync (Vector3 position, Quaternion rotation, Transform parent=null) |
| Task< TObject > | LoadAssetReferenceAsync () |
| Loads the Object to clone and caches it in the CachedAssetReference | |
| Task | UnloadAssetReference () |
| Unloads the CachedAssetReference when using addressables. For convenience you can also just call Dispose(). | |
Properties | |
| TObject | CachedAssetReference [get, set] |
| Either set a cached asset yourself or call and await LoadAssetReferenceAsync() to initialize this property. By default, this cached asset reference will be used for Instantiation and it is even recommended you use it yourself to avoid overhead. | |
Defines a contract for instantiating Unity Objects in an async manner.
| TObject | The type of the Unity object managed by this interface, constrained to UnityEngine.Object types. |
| TObject | : | Object |
| Task< TObject > NikosAssets.Instantiation.IInstantiation< TObject >.CreateInstanceAsync | ( | Transform | parent = null, |
| bool | worldPositionStays = false ) |
| Task< TObject > NikosAssets.Instantiation.IInstantiation< TObject >.CreateInstanceAsync | ( | Vector3 | position, |
| Quaternion | rotation, | ||
| Transform | parent = null ) |
| Task< TObject > NikosAssets.Instantiation.IInstantiation< TObject >.LoadAssetReferenceAsync | ( | ) |
Loads the Object to clone and caches it in the CachedAssetReference
Implemented in NikosAssets.Instantiation.BaseAddressableInstantiationMono< TObject >, NikosAssets.Instantiation.BaseDefaultInstantiationMono< TObject >, NikosAssets.Instantiation.BaseInstantiationData< TObject >, and NikosAssets.Instantiation.BaseInstantiationMono< TObject >.
| Task NikosAssets.Instantiation.IInstantiation< TObject >.UnloadAssetReference | ( | ) |
Unloads the CachedAssetReference when using addressables. For convenience you can also just call Dispose().
Implemented in NikosAssets.Instantiation.BaseAddressableInstantiationMono< TObject >, NikosAssets.Instantiation.BaseDefaultInstantiationMono< TObject >, NikosAssets.Instantiation.BaseInstantiationData< TObject >, and NikosAssets.Instantiation.BaseInstantiationMono< TObject >.
|
getset |
Either set a cached asset yourself or call and await LoadAssetReferenceAsync() to initialize this property. By default, this cached asset reference will be used for Instantiation and it is even recommended you use it yourself to avoid overhead.
Implemented in NikosAssets.Instantiation.BaseAddressableInstantiationMono< TObject >, NikosAssets.Instantiation.BaseDefaultInstantiationMono< TObject >, NikosAssets.Instantiation.BaseInstantiationData< TObject >, and NikosAssets.Instantiation.BaseInstantiationMono< TObject >.