API reference

FixedPool Class

A pool of objects that can be reused.

Constructors

FixedPool ( primitive , size , callbacks )
Provides a fixed pool with the given size and the type of primitive.
Use callbacks to register specific callbacks
Signature
FixedPool(T primitive, int size, Callbacks callbacks)
Parameters
primitive: T  The primitive (gameobject)
size: int  Size of the pool
callbacks: Callbacks  Custom or generic callbacks to attach for create, onGet, onRelease

Protected Properties

CountActive : override int
[Get]
Returns the active objects in the pool.
Signature
override int CountActive
CountAll : override int
[Get]
Returns the length of the pool.
Signature
override int CountAll

Methods

Get ()
Get an object from the pool.
Signature
override T Get()
Returns
override T
Release ( t )
Release an object back to the pool.
Signature
override void Release(T t)
Parameters
t: T
Returns
override void