Ultimate Pooling Scripting Reference
UltimatePoolbatchSpawn Method (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.
Namespace: UltimatePooling
Assembly: Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0

public static IEnumerable<Object> batchSpawn( string prefabName, int amount )
UltimatePooling.UltimatePool.batchSpawn = function(prefabName, amount);
Parameters
- prefabName
- Type: SystemString
The name of the prefab to spawn from - amount
- Type: SystemInt32
The amount of instances to create from this prefab
Return Value
Type: IEnumerableObjectAn enumeration of the spawned instances
