ObjectPool.

ReleaseAllOnSceneUnload<T>(ObjectPool<T>) Method

Summary

Registers a UnityEngine.SceneManagement.SceneManager.sceneUnloaded callback to call Weaver.ObjectPool`1.ReleaseAll.

The returned delegate can be stored to later unregister from the event if necessary.
Assembly
Weaver.dll
Namespace
Weaver
Containing Type
ObjectPool

Syntax

public static UnityAction<Scene> ReleaseAllOnSceneUnload<T>(this ObjectPool<T> pool) where T : class

Type Parameters

Name Description
T

Parameters

Name Type Description
pool ObjectPool<T>

Return Value

Type Description
UnityAction<Scene>