ObjectPool.

TryReleaseOrDestroy<T>(ObjectPool<T>, T) Method

Summary

If the `pool` isn't null this method gives the `item` to it and returns true. Otherwise this method destroys it and returns false.

Note that this method is likely not what you want to use for UnityEngine.Components. Use Weaver.ObjectPool.TryReleaseOrDestroyGameObject``1(Weaver.ObjectPool{``0},``0) instead.
Assembly
Weaver.dll
Namespace
Weaver
Containing Type
ObjectPool

Syntax

public static bool TryReleaseOrDestroy<T>(this ObjectPool<T> pool, T item) where T : Object

Type Parameters

Name Description
T

Parameters

Name Type Description
pool ObjectPool<T>
item T

Return Value

Type Description
bool