Ultimate Pooling Scripting Reference
UltimatePool Class |
The main class or interacting with the UltimatePooling API.
All spawning and despawning methods are found in this class however you can use the individual spawn method on pools if required.

Namespace: UltimatePooling
Assembly: Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0

public static class UltimatePool
UltimatePooling.UltimatePool = function(); Type.createClass( 'UltimatePooling.UltimatePool');
The UltimatePool type exposes the following members.

Name | Description | |
---|---|---|
![]() ![]() | batchDespawn(IEnumerableComponent) |
Attempts to Despawn all objects and return them to their pool group.
Important: All objects in the enumerable collection must have been spawned from the same pool group.
If you attempt to return instances from multiple pools using this method then you will invalidate all associated pool groups.
|
![]() ![]() | batchDespawn(IEnumerableGameObject) |
Attempts to Despawn all objects and return them to their pool group.
Important: All objects in the enumerable collection must have been spawned from the same pool group.
If you attempt to return instances from multiple pools using this method then you will invalidate all associated pool groups.
|
![]() ![]() | batchSpawn(String, Int32) |
Spawn a number of instance of a prefab with the specified name from the appropriate pool.
This method will only succeed if the pool has been created before hand.
Batch spawning is quicker than multiple calls to spawn(String) because the pool is cached on the first spawn.
|
![]() ![]() | batchSpawn(Component, Int32) |
Spawn a number of instances of the specified component prefab from the appropriate pool.
If no pool exists, then one is automatically created for the prefab type.
Batch spawning is quicker than multiple calls to spawn(Component) because the pool is cached on the first spawn.
|
![]() ![]() | batchSpawn(GameObject, Int32) |
Spawn a number of instances of the specified prefab from the appropriate pool.
If no pool exists, then one is automatically created for the prefab type.
Batch spawning is quicker than multiple calls to spawn(GameObject) because the pool is cached on the first spawn.
|
![]() ![]() | batchSpawn(String, Object, Int32) |
Spawn a number of instances of a prefab with the specified name from the appropriate pool.
This overload allows the user to manage the array where the objects will be spawned to avoid garbage generation.
This method will only succeed if the pool has been created before hand.
Batch spawning is quicker than multiple calls to spawn(String) because the pool is cached on the first spawn.
If amount is specified then the value should be less than or equal to the length of the array otherwise an out of bounds exception may occur.
|
![]() ![]() | batchSpawn(Component, Object, Int32) |
Spawn a number of instances of the specified prefab and place the results in the specified array.
This overload allows the user to manager the array where the objects will be spawned to avoid garbage generation.
If no pool exists, then one is automatically created for the prefab type.
Batch spawning is quicker than multiple calls to spawn(Component) because the pool is cached on the first spawn.
If amount is specified then the value should be less than or equal to the length of the array otherwise an out of bounds exception may occur.
|
![]() ![]() | batchSpawn(GameObject, GameObject, Int32) |
Spawn a number of instances of the specified prefab and place the results in the specified array.
This overload allows the user to manage the array where the objects will be spawned to avoid garbage generation.
If no pool exists, then one is automatically created for the prefab type.
Batch spawning is quicker than multiple calls to spawn(GameObject) because the pool is cached on the first spawn.
If amount is specified then the value should be less than or equal to the length of the array otherwise an out of bounds exception may occur.
|
![]() ![]() | batchSpawnT(Component, Int32) |
Spawn a number of instances of the specified component prefab from the appropriate pool.
If no pool exists, then one is automatically created for the prefab type.
Batch spawning is quicker than multiple calls to spawnT(Component) because the pool is cached on the first spawn.
|
![]() ![]() | batchSpawnT(Component, T, Int32) |
Spawn a number of instance of the specified prefab and place the results in the specified array.
This overload allows the user to manage the array where the objects will be spawned to avoid garbage generation.
If no pool exists, then one is automatically created for the prefab type.
Batch spawning is quicker that multiple calls to spawnT(Component) because the pool is cached on the first spawn.
If amount is specified then the value should be less than or equal to the length of the array otherwise an out of bounds exception may occur.
|
![]() ![]() | despawn(Object) |
Direct replacement for 'Object.Destroy' for pooling.
Allows the specified instance to be returned to the pool and re-used at a later time.
|
![]() ![]() | despawn(Object, Single) |
Direct overload replacement for 'Object.Destroy' for pooling.
Allows the specified instance to be returned to the pool and re-used at a later time.
|
![]() ![]() | despawnAll(GameObject) |
Calls all spawned instances of the specified prefab back to their pool.
This method allows you to pass a prefab such as a 'Bullet' which will subsequently cause all 'Bullet' instances to be despawned.
|
![]() ![]() | despawnAll(GameObject, Single) |
Calls all spawned instances of the specified prefab back to their pool.
This method allows you to pass a prefab such as a 'Bullet' which will subsequently cause all 'Bullet' instances to be despawned.
|
![]() ![]() | spawn(String) |
Spawn an instance of a prefab with the specified name.
The prefab name is the same name used when creating the pool, or if no name is used then the name of the prefab supplied is substituted.
This method will only succeed if the pool has been created before hand.
|
![]() ![]() | spawn(Component) |
Spawn an instance of the specified component prefab from the appropriate pool.
If no pool exists, then one is automatically created for the prefab type.
|
![]() ![]() | spawn(GameObject) |
Spawn an instance of the specified prefab from the appropriate pool.
If no pool exists, then one is automatically created for the prefab type.
|
![]() ![]() | spawn(String, Vector3, Quaternion) |
Spawn an instance of a prefab with the specified name.
This method will only succeed if the pool has been created before hand.
|
![]() ![]() | spawn(Component, Vector3, Quaternion) |
Spawn an instance of the specified component prefab from the appropriate pool.
If no pool exists, then one is automatically created for the component prefab type.
|
![]() ![]() | spawn(GameObject, Vector3, Quaternion) |
Spawn an instance of the specified prefab from the appropriate pool.
If no pool exists, then one is automatically created for the prefab type.
|
![]() ![]() | spawnT(Component) |
Spawn an instance of the specified component prefab from the appropriate pool.
If no pool exists, then one is automatically created for the prefab type.
|
![]() ![]() | spawnT(Component, Vector3, Quaternion) |
Spawn an instance of the specified component prefab from the appropriate pool.
If no pools exists, then one is automatically created for the component prefab type.
|

Name | Description | |
---|---|---|
![]() ![]() | logLevel |
The amount level of logging that is allowed. Default is 'Message' - Full logging.
|

Name | Description | |
---|---|---|
![]() ![]() | Pools |
Access the pool manager which maintains all existing pools.
Allows pools to be created and destroyed.
|
