GameObjectExtensions.DestroyChildren

Extension Method in GameObjectExtensions

Declaration

public static void DestroyChildren(this GameObject parent)

Description

Destroys all children game objects of the parent.

Parameters

parentThe parent game object to destroy the children of.

Overload

Declaration

public static void DestroyChildren(this GameObject parent, float delay)

Description

Destroys all children game objects of the parent after a delay.

Parameters

parentThe parent game object to destroy the children of.
delayThe delay before destroying the game objects.