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

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