Click or drag to resize

ComponentPoolManagerTryAcquireT Method (Transform, T)

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

Acquires an instance of the component T from an attached pool, and sets the parent transform 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<T>(
	Transform parent,
	out T instance
)
where T : Component

Parameters

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

Type Parameters

T
The type of component to acquire an instance of.

Return Value

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