Impact CFX API 1.5.0
Comprehensive API documentation for Impact CFX - Collision Effects System
Loading...
Searching...
No Matches
ImpactCFX.EffectObjectPool< T > Class Template Reference

Common implementation for an object pool used by effects with a template object. More...

Inheritance diagram for ImpactCFX.EffectObjectPool< T >:
ImpactCFX.Pooling.ObjectPool< T >

Public Member Functions

void InitializeWithTemplate (T template)
 Initializes the pool.
 
- Public Member Functions inherited from ImpactCFX.Pooling.ObjectPool< T >
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< PooledObjectDataGetPooledObjectDataArray ()
 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.
 

Protected Member Functions

override T createPooledObjectInstance (int index)
 Creates a new instance of a pooled object.
 
abstract T createPooledObjectInstance (int index)
 Creates a new instance of a pooled object.
 

Properties

Template [get]
 The template used to create all objects for this object pool.
 
- Properties inherited from ImpactCFX.Pooling.ObjectPool< T >
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.
 

Additional Inherited Members

- Protected Attributes inherited from ImpactCFX.Pooling.ObjectPool< T >
T[] pooledObjects
 
NativeArray< PooledObjectDatapooledObjectData
 

Detailed Description

Common implementation for an object pool used by effects with a template object.

Template Parameters
TThe type of object to be pooled.
Type Constraints
T :PooledEffectObjectBase 

Member Function Documentation

◆ createPooledObjectInstance()

override T ImpactCFX.EffectObjectPool< T >.createPooledObjectInstance ( int  index)
protectedvirtual

Creates a new instance of a pooled object.

Parameters
indexThe index of the object in the pool's array.

Implements ImpactCFX.Pooling.ObjectPool< T >.

◆ InitializeWithTemplate()

void ImpactCFX.EffectObjectPool< T >.InitializeWithTemplate ( template)

Initializes the pool.

Parameters
templateThe template object.