Click or drag to resize

NamedGameObjectPoolManager.TryAcquire Method (String, Vector3, Quaternion, GameObject)

[This is preliminary documentation and is subject to change.]

Acquires an instance of the source object with the specified name from an attached pool, and sets its position and rotation.

Namespace:  Umbrace.Unity.PurePool
Assembly:  Umbrace.Unity.PurePool (in Umbrace.Unity.PurePool.dll) Version: 0.0.0.0 (1.0.0.0)
Syntax
C#
public bool TryAcquire(
	string sourceObject,
	Vector3 position,
	Quaternion rotation,
	out GameObject instance
)

Parameters

sourceObject
Type: System.String
The name of the game object to acquire an instance of.
position
Type: UnityEngine.Vector3
The position to set the instance's transform to.
rotation
Type: UnityEngine.Quaternion
The rotation to set the instance's transform to.
instance
Type: UnityEngine.GameObject
When this method returns, contains the instance of sourceObject, if one could be acquired; otherwise, null. This parameter is passed uninitialised.

Return Value

Type: Boolean
true if an instance of sourceObject was acquired from an attached pool; otherwise, false.
See Also