Class DefaultPoolAble
Represents a default implementation of the IPoolAble interface for making a GameObject poolable. This implementation does nothing in terms of custom behavior, serving as a simple marker for poolable GameObjects. For specific and custom functionality, it is recommended to implement the IPoolAble interface directly on your own MonoBehaviour and define the desired behaviors in the corresponding methods.
Inheritance
Implements
Namespace: GUPS.EasyPooling
Assembly: cs.temp.dll.dll
Syntax
public class DefaultPoolAble : MonoBehaviour, IPoolAble
Remarks
The DefaultPoolAble class extends
Properties
IsPooled
Indicating whether this poolable object is inactive in its pool.
Declaration
public bool IsPooled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Owner
The pool this poolable object belongs to.
Declaration
public IPool Owner { get; set; }
Property Value
Type | Description |
---|---|
IPool |
Methods
OnCreate()
Called when the poolable object is newly created by the pool and not received from any already pooled object.
Declaration
public void OnCreate()
OnDespawn()
Called when the poolable object is despawned and returned to the pool.
Declaration
public void OnDespawn()
OnDestroy()
Called when the poolable object is destroyed and will not return to the pool.
Declaration
public void OnDestroy()
OnSpawn()
Called when the poolable object is spawned from the pool or after OnCreate().
Declaration
public void OnSpawn()