Language
Edit

IDataObjectPool.ReturnObjectToPool(Object) Method

Definition

Return an object to the pool in a reset, unused state.

public bool ReturnObjectToPool(object objectToReturn);
abstract member ReturnObjectToPool : obj -> bool
Public Function ReturnObjectToPool (objectToReturn As Object) As Boolean

Parameters

objectToReturn
Object

The object to return to the pool.

Returns

true if there was space for the prefab.

Remarks

If this method returns false, there was no space for the object and it is the caller's responsibility to destroy the object.

To place a pre-initialized object prefab into the pool, use AddPrefetchedObjectToPool instead.

Applies to