Skip to content

Object Pool Clear

Clears the object pool for a prefab. Inactive pooled objects are destroyed. Optionally destroy active spawned objects too.

Parameters

Parameter Description
Prefab The prefab in the object pool.
Include Inactive Also destroy active spawned objects currently in the scene.
Normally spawned object have their own life-cycle that you want to keep.
Use this to destroy spawned objects immediately.

Usages

Use this when you know that you won't be using the pool again (or for a while) to release resources used by the pool.