Ultimate Pooling Scripting Reference
PoolGroup Methods |
The PoolGroup type exposes the following members.

Name | Description | |
---|---|---|
![]() |
despawn(Object) |
Indicates that the specified instance can be returned to the pool and re-used at a later time.
|
![]() |
despawn(Object, Single) |
Indicates that the specified instance can be returned to the pool and re-used at a later time.
|
![]() |
despawnAll |
Attempts to reclaim all instances spawned by this pool and return them to the pool.
Any instances spawned by this pool will be forcefully returned without warning.
|
![]() |
despawnAll(Single) |
Attempts to reclaim all instances spawned by this pool after the specified time delay.
Any instances spawned by this pool will be forcefully returned without warning.
|
![]() |
destroy |
Attempts to destroy a specific instance from the pool.
Note that 'OnDespawn' will not be called on the instance. Instead you should handle any cleanup in 'OnDestroy'
|
![]() |
destroyAll |
Attempts to destroy all pooled objects effectivley emptying the pool and resetting its state.
Note that 'OnDespawn' will not be called on the pooled objects. Instead you should handle any cleanup in 'OnDestroy'
|
![]() |
destroySelf |
Attempts to destroy all pooled objects effectivley emptying the pool as well as destroying the pool instance.
This is the prefered way of destroying an object pool as it allows the spawned objects to remain in the scene if required as opposed to being destroyed along with the pool.
Note that 'OnDespawn' will not be called on any of the pooled objects. Instead you should handle any cleanup in 'OnDestroy'
|
![]() |
didSpawn |
Returns true if this spawn group created the instance specified.
Useful for spawn validation to make sure multiple pools are not attempting to manage the same instance.
|
![]() |
onInstanceDespawned |
Should be implemented by the inheriting class.
Called when the object is about to be returned to the pool.
|
![]() |
onInstanceSpawned |
Should be implemented by the inheriting class.
Called when the object has been taken from the pool and will be re-used.
|
![]() |
spawn |
Spawn an instance from the pool.
|
![]() |
spawn(Vector3, Quaternion) |
Spawn an instance from the pool using the specified position and rotation.
|
![]() |
Start |
Called by Unity on the first frame.
|
![]() |
ToString |
Override the string value to return detaild state information about the pool.
(Overrides Object.ToString.) |
