ObjectPoolController.Destroy Method

Audio Toolkit

Collapse image Expand Image Copy image CopyHover image
Destroys the specified game object, respectively sets the object inactive and adds it to the pool.

Namespace: (Default Namespace)
Assembly: AudioToolkit (in AudioToolkit.dll) Version: 8.0.0.0 (8.0.0.0)

Syntax

C#
public static void Destroy(
	GameObject obj
)

Parameters

obj
Type: GameObject
The game object.

Remarks

Can be used on none-poolable objects as well. It is good practice to use ObjectPoolController.Destroy whenever you may possibly make your prefab poolable in the future.

Must also be used on none-poolable objects with poolable child objects so the poolable child objects are correctly moved to the pool.

See Also