Click or drag to resize

PoolHelperSpawnT Method (T, Vector3, Quaternion, Transform)

Spawns a recycled object if there's one available, otherwise creates a new instance.

Namespace:  Archon.SwissArmyLib.Pooling
Assembly:  Archon.SwissArmyLib (in Archon.SwissArmyLib.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public static T Spawn<T>(
	T prefab,
	Vector3 position,
	Quaternion rotation,
	Transform parent
)
where T : Object
Request Example View Source

Parameters

prefab
Type: T

[Missing <param name="prefab"/> documentation for "M:Archon.SwissArmyLib.Pooling.PoolHelper.Spawn``1(``0,UnityEngine.Vector3,UnityEngine.Quaternion,UnityEngine.Transform)"]

position
Type: Vector3

[Missing <param name="position"/> documentation for "M:Archon.SwissArmyLib.Pooling.PoolHelper.Spawn``1(``0,UnityEngine.Vector3,UnityEngine.Quaternion,UnityEngine.Transform)"]

rotation
Type: Quaternion

[Missing <param name="rotation"/> documentation for "M:Archon.SwissArmyLib.Pooling.PoolHelper.Spawn``1(``0,UnityEngine.Vector3,UnityEngine.Quaternion,UnityEngine.Transform)"]

parent
Type: Transform

[Missing <param name="parent"/> documentation for "M:Archon.SwissArmyLib.Pooling.PoolHelper.Spawn``1(``0,UnityEngine.Vector3,UnityEngine.Quaternion,UnityEngine.Transform)"]

Type Parameters

T

[Missing <typeparam name="T"/> documentation for "M:Archon.SwissArmyLib.Pooling.PoolHelper.Spawn``1(``0,UnityEngine.Vector3,UnityEngine.Quaternion,UnityEngine.Transform)"]

Return Value

Type: T
The spawned object.
See Also