Click or drag to resize

SerialisableGameObjectPool.TryAcquire Method (Transform, Boolean, GameObject)

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

Acquires an instance of the source object, and sets its parent transform.

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,
	bool spawnInWorldSpace,
	out GameObject instance
)

Parameters

parent
Type: UnityEngine.Transform
The transform to which the instance should be parented.
spawnInWorldSpace
Type: System.Boolean
true if the original world position should be maintained when assigning the parent; otherwise, false.
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 the pool; otherwise, false.
See Also