![]() |
Infohazard.Core 1.4.1
Infohazard Core Utility Library
|
Only used internally. More...
Classes | |
class | PropNames |
This is used to refer to the names of private fields in this class from a custom Editor. More... | |
Public Member Functions | |
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 | |
abstract void | GetSpawnableAndGameObject (T obj, out Spawnable spawnable, out GameObject gameObject) |
Override to return the associated Spawnable script and GameObject for given object. More... | |
Properties | |
bool | IsValid [get] |
Whether there is a valid prefab is attached. More... | |
T | Prefab [get] |
The prefab to be spawned. More... | |
Only used internally.
Used as a serializable utility for referencing a prefab, managing its DefaultPoolHandler, and retaining/releasing that pool handler as necessary.
T | The type of object to be referenced. |
T | : | Object |
Infohazard.Core.SpawnRefBase< T >.SpawnRefBase | ( | ) |
Default constructor (needed for Unity serialization).
Infohazard.Core.SpawnRefBase< T >.SpawnRefBase | ( | T | prefab | ) |
Construct with a given prefab.
prefab | The prefab to be spawned. |
|
protectedpure virtual |
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. |
Implemented in Infohazard.Core.SpawnRef< T >.
|
virtual |
Remove a user from the SpawnRef, in turn releasing the IPoolHandler.
|
virtual |
Add a user to the SpawnRef, creating the DefaultPoolHandler if necessary.
The IPoolHandler for the object will be retained.
T Infohazard.Core.SpawnRefBase< T >.Spawn | ( | in SpawnParams | spawnParams = default | ) |
|
get |
Whether there is a valid prefab is attached.
|
get |
The prefab to be spawned.