unity remove all child code example Example: unity delete all children foreach (Transform child in transform) { Destroy(child.gameObject); }