Common implementation for an object pool used by effects with a template object.
More...
|
void | InitializeWithTemplate (T template) |
| Initializes the pool.
|
|
void | Initialize (int poolID, ObjectPoolConfig objectPoolConfig) |
| Initializes the pool.
|
|
virtual void | Initialize (int poolID, int poolSize, ObjectPoolStealing stealing) |
| Initializes the pool.
|
|
virtual T | RetrieveObject (int index, float priority, long contactPointID) |
| Retrieves the object at the given index from the pool.
|
|
void | ReturnAllObjectsToPool () |
| Returns all of this pool's objects to the pool.
|
|
void | Destroy () |
| Completely disposes and destroys this pool and all of all pooled data and objects.
|
|
void | UpdatePooledObjects () |
|
NativeArray< PooledObjectData > | GetPooledObjectDataArray () |
| Gets a pooled object data array in a form suitable for jobs.
|
|
void | ReinstantiateMissingObjects () |
| Re-instantiates any objects that have been destroyed. This can happen if a pooled object is made a child of an object that gets destroyed on scene load/unload.
|
|
|
T | Template [get] |
| The template used to create all objects for this object pool.
|
|
int | PoolID [get] |
| The unique identifier for the pool.
|
|
int | PoolSize [get] |
| The number of objects in the pool.
|
|
ObjectPoolStealing | Stealing [get] |
| How objects should be "stolen" if there are no available objects in the pool.
|
|
Common implementation for an object pool used by effects with a template object.
- Template Parameters
-
T | The type of object to be pooled. |
◆ createPooledObjectInstance()
◆ InitializeWithTemplate()
Initializes the pool.
- Parameters
-
template | The template object. |