BasicPooledObjectPool
An abstract class in Root.Township, the global namespace.
Base pool for one PooledObjectDefinition. Fills itself with the initial pool size of inactive copies and empties on game reload. PooledObjectPool and MaxLimitPooledObjectPool derive from it.
- Listed in Global namespace: A to B
- Derived types
MaxLimitPooledObjectPool,PooledObjectPool
Constructors
| Member | What it is |
|---|---|
BasicPooledObjectPool(PooledObjectDefinition definition) | Creates a BasicPooledObjectPool from definition. |
Fields
| Member | What it is |
|---|---|
protected readonly PooledObjectDefinition definition | The definition this pool serves. |
protected Stack<PooledObject> pooledObjects | Inactive objects ready to hand out. |
Methods
| Member | What it is |
|---|---|
abstract void Release(PooledObject pooledObject, Action releaseCallback) | Returns an object to the pool, then calls the callback. |
abstract PooledObject Request(Vector3 position, Quaternion rotation) | Takes an object from the pool at the given position and rotation. |
Used in
Members of other types that take, return or hold a BasicPooledObjectPool: