







![]() |
ClockStone Audio Toolkit for Unity - Documentation |
PoolableObject Class |
Members See Also Send Feedback |
![]() |
Add this component to your prefab to make it poolable.
Namespace: (Default Namespace)
Assembly: AudioToolkit (in AudioToolkit.dll) Version: 8.0.0.0 (8.0.0.0)
Syntax
C# |
---|
public class PoolableObject : MonoBehaviour |
Remarks
See ObjectPoolController for an explanation how to set up a prefab for pooling.
The following messages are sent to a poolable object:
- Awake and OnDestroy whenever a poolable object is activated or deactivated from the pool. This way the same behaviour is simulated as if the object was instantiated respectively destroyed. These messages are only sent when sendAwakeStartOnDestroyMessage is enabled.
- OnPoolableInstanceAwake and OnPoolableInstanceDestroy when the object was actually instantiated respectively destroyed. Because of current Unity limitations OnPoolableInstanceDestroy does not work on Flash!
- OnPoolableObjectActivated and OnPoolableObjectDeactivated whenever a poolable object is activated or deactivated from the pool. These messages are only sent when sendPoolableActivateDeactivateMessages is enabled.