UltimatePool Methods

Ultimate Pooling

UltimatePool Methods
Methods
  Name Description
Public method Static member 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.
Public method Static member 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.
Public method Static member 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.
Public method Static member 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.
Public method Static member 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.
Public method Static member 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.
Public method Static member 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.
Public method Static member 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.
Public method Static member 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.
Public method Static member 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.
Public method Static member 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.
Public method Static member 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.
Public method Static member 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.
Public method Static member 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.
Public method Static member 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.
Public method Static member 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.
Public method Static member 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.
Public method Static member 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.
Public method Static member 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.
Public method Static member 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.
Public method Static member 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.
Public method Static member 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.
Top
See Also