Click or drag to resize

SerialisableGenericComponentPool<T>.TryAcquire Method (Transform, Vector3, Quaternion, T)

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

Acquires an instance of the component, and sets the parent transform, position and rotation of its GameObject.

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(
	Transform parent,
	Vector3 position,
	Quaternion rotation,
	out T instance
)

Parameters

parent
Type: UnityEngine.Transform
The transform to which the component's GameObject should be parented.
position
Type: UnityEngine.Vector3
The position to set the component's transform to.
rotation
Type: UnityEngine.Quaternion
The rotation to set the component's transform to.
instance
Type: T
When this method returns, contains the instance of the component T, if one could be acquired; otherwise, null. This parameter is passed uninitialised.

Return Value

Type: Boolean
true if an instance of the component T was acquired from the pool; otherwise, false.
See Also