Pro Pooling
|
This can be used for setting / resetting and cleaning up state when objects are taken into use. More...
Public Member Functions | |
void | OnSpawned (PoolItem poolItem) |
Called when the gameobject containing the component is spawned from a pool More... | |
void | OnDespawned (PoolItem poolItem) |
Called when the gameobject containing the component is returned to a pool More... | |
This can be used for setting / resetting and cleaning up state when objects are taken into use.
Implement this interface on a component to automatically have the corresponding methods called when the components gameobject is either spawned from the pool for use, or despawned back to the pool.
void ProPooling.IPoolComponent.OnDespawned | ( | PoolItem | poolItem | ) |
Called when the gameobject containing the component is returned to a pool
Implemented in ProPooling.Components.DespawnAfterCollision, ProPooling.Components.DespawnAfterCollision2D, ProPooling.Components.DespawnAfterDelay, ProPooling.Components.OnDespawnResetTransform, ProPooling.Components.OnDespawnResetRigidbody, ProPooling.Components.OnDespawnResetRigidbody2D, and ProPooling.Components.OnSpawnEnableChildren.
void ProPooling.IPoolComponent.OnSpawned | ( | PoolItem | poolItem | ) |
Called when the gameobject containing the component is spawned from a pool
Implemented in ProPooling.Components.DespawnAfterCollision, ProPooling.Components.DespawnAfterCollision2D, ProPooling.Components.DespawnAfterDelay, ProPooling.Components.OnDespawnResetTransform, ProPooling.Components.OnDespawnResetRigidbody, ProPooling.Components.OnDespawnResetRigidbody2D, and ProPooling.Components.OnSpawnEnableChildren.