UltimatePool Class

Ultimate Pooling

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.
Inheritance Hierarchy
SystemObject  UltimatePoolingUltimatePool

Namespace: UltimatePooling
Assembly: Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
public static class UltimatePool
UltimatePooling.UltimatePool = function();

Type.createClass(
	'UltimatePooling.UltimatePool');

The UltimatePool type exposes the following members.

Methods
  NameDescription
Public methodStatic memberbatchDespawn(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.
Public methodStatic memberbatchDespawn(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.
Public methodStatic memberbatchSpawn(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.
Public methodStatic memberbatchSpawn(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.
Public methodStatic memberbatchSpawn(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.
Public methodStatic memberbatchSpawn(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.
Public methodStatic memberbatchSpawn(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.
Public methodStatic memberbatchSpawn(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.
Public methodStatic memberbatchSpawnT(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.
Public methodStatic memberbatchSpawnT(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.
Public methodStatic memberdespawn(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.
Public methodStatic memberdespawn(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.
Public methodStatic memberdespawnAll(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.
Public methodStatic memberdespawnAll(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.
Public methodStatic memberspawn(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.
Public methodStatic memberspawn(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.
Public methodStatic memberspawn(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.
Public methodStatic memberspawn(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.
Public methodStatic memberspawn(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.
Public methodStatic memberspawn(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.
Public methodStatic memberspawnT(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.
Public methodStatic memberspawnT(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.
Top
Fields
  NameDescription
Public fieldStatic memberlogLevel
The amount level of logging that is allowed. Default is 'Message' - Full logging.
Top
Properties
  NameDescription
Public propertyStatic memberPools
Access the pool manager which maintains all existing pools. Allows pools to be created and destroyed.
Top
See Also