PoolGroup.destroySelf Method

Ultimate Pooling

PoolGroupdestroySelf Method
Attempts to destroy all pooled objects effectivley emptying the pool as well as destroying the pool instance. This is the prefered way of destroying an object pool as it allows the spawned objects to remain in the scene if required as opposed to being destroyed along with the pool. Note that 'OnDespawn' will not be called on any of the pooled objects. Instead you should handle any cleanup in 'OnDestroy'

Namespace: UltimatePooling
Assembly: Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
public void destroySelf(
	bool keepSpawnedInstances = true
)
function destroySelf(keepSpawnedInstances);

Parameters

keepSpawnedInstances (Optional)
Type: SystemBoolean
When true, the pool will avoid destroying its parent object if the objects spawned by this pool are parented to it. This allows them to remain in the scene even though the pool will be destroyed
See Also