![]() |
NikosAssets.Instantiation 0.1.0
|
A wrapper class to handle the instantiation implementation as a MonoBehaviour. More...
Public Member Functions | |
| virtual void | Dispose () |
| Executed by OnDestroy | |
| 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(). | |
Protected Member Functions | |
| virtual void | OnDestroy () |
| Calls 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. | |
A wrapper class to handle the instantiation implementation as a MonoBehaviour.
| TObject |
| TObject | : | Object |
|
abstract |
|
abstract |
|
abstract |
Loads the Object to clone and caches it in the CachedAssetReference
Implements NikosAssets.Instantiation.IInstantiation< TObject >.
|
protectedvirtual |
Calls Dispose
Reimplemented in NikosAssets.Instantiation.BaseAddressableInstantiationMono< TObject >.
|
abstract |
Unloads the CachedAssetReference when using addressables. For convenience you can also just call Dispose().
Implements NikosAssets.Instantiation.IInstantiation< TObject >.
|
getsetabstract |
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.
Implements NikosAssets.Instantiation.IInstantiation< TObject >.