UltimatePool.batchSpawn Method (Component, Int32)

Ultimate Pooling

UltimatePoolbatchSpawn Method (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.

Namespace: UltimatePooling
Assembly: Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
public static IEnumerable<Object> batchSpawn(
	Component prefab,
	int amount
)
UltimatePooling.UltimatePool.batchSpawn = function(prefab, amount);

Parameters

prefab
Type: Component
The component prefab to spawn from
amount
Type: SystemInt32
The amount of instances to create from this prefab

Return Value

Type: IEnumerableObject
An enumeration of the spawned instances
See Also