This will destroy all child objects of a given GameObject (‘go’) : –
// Remove all child objects
foreach (Transform child in go.transform)
Destroy(child.gameObject);
This will destroy all child objects of a given GameObject (‘go’) : – // Remove all child objects foreach (Transform child in go.transform) Destroy(child.gameObject);
This will destroy all child objects of a given GameObject (‘go’) : –
// Remove all child objects
foreach (Transform child in go.transform)
Destroy(child.gameObject);
Subscribe to get the latest posts sent to your email.
thanks for help
that so useful
Leave a comment