![]() |
Infohazard.Core 1.4.1
Infohazard Core Utility Library
|
SpawnRef for spawning a GameObject directly. More...
Public Member Functions | |
SpawnRef () | |
Default constructor (needed for Unity serialization). More... | |
SpawnRef (GameObject prefab) | |
Construct with a given prefab. More... | |
SpawnRef () | |
Default constructor (needed for Unity serialization). More... | |
SpawnRef (T prefab) | |
Construct with a given prefab component. More... | |
![]() | |
SpawnRefBase () | |
Default constructor (needed for Unity serialization). More... | |
SpawnRefBase (T prefab) | |
Construct with a given prefab. More... | |
virtual void | Retain () |
Add a user to the SpawnRef, creating the DefaultPoolHandler if necessary. More... | |
virtual void | Release () |
Remove a user from the SpawnRef, in turn releasing the IPoolHandler. More... | |
T | Spawn (in SpawnParams spawnParams=default) |
Spawn an instance of Prefab. The SpawnRef MUST be retained. More... | |
![]() | |
SpawnRefBase () | |
Default constructor (needed for Unity serialization). More... | |
SpawnRefBase (T prefab) | |
Construct with a given prefab. More... | |
virtual void | Retain () |
Add a user to the SpawnRef, creating the DefaultPoolHandler if necessary. More... | |
virtual void | Release () |
Remove a user from the SpawnRef, in turn releasing the IPoolHandler. More... | |
T | Spawn (in SpawnParams spawnParams=default) |
Spawn an instance of Prefab. The SpawnRef MUST be retained. More... | |
Protected Member Functions | |
override void | GetSpawnableAndGameObject (T obj, out Spawnable spawnable, out GameObject gameObject) |
Override to return the associated Spawnable script and GameObject for given object. More... | |
abstract void | GetSpawnableAndGameObject (T obj, out Spawnable spawnable, out GameObject gameObject) |
Override to return the associated Spawnable script and GameObject for given object. More... | |
abstract void | GetSpawnableAndGameObject (T obj, out Spawnable spawnable, out GameObject gameObject) |
Override to return the associated Spawnable script and GameObject for given object. More... | |
Additional Inherited Members | |
![]() | |
bool | IsValid [get] |
Whether there is a valid prefab is attached. More... | |
T | Prefab [get] |
The prefab to be spawned. More... | |
![]() | |
bool | IsValid [get] |
Whether there is a valid prefab is attached. More... | |
T | Prefab [get] |
The prefab to be spawned. More... | |
SpawnRef for spawning a GameObject directly.
SpawnRef for spawning a GameObject via one of its components.
T | : | Component |
Infohazard.Core.SpawnRef< T >.SpawnRef | ( | ) |
Default constructor (needed for Unity serialization).
Infohazard.Core.SpawnRef< T >.SpawnRef | ( | GameObject | prefab | ) |
Construct with a given prefab.
prefab | The prefab to be spawned. |
inheritdoc/>
Infohazard.Core.SpawnRef< T >.SpawnRef | ( | ) |
Default constructor (needed for Unity serialization).
Infohazard.Core.SpawnRef< T >.SpawnRef | ( | T | prefab | ) |
Construct with a given prefab component.
prefab | The prefab to be spawned. |
inheritdoc/>
|
protectedvirtual |
Override to return the associated Spawnable script and GameObject for given object.
obj | The attached object. |
spawnable | The Spawnable script for obj. |
gameObject | The GameObject for obj. |
Implements Infohazard.Core.SpawnRefBase< T >.