Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

unity destroy all children

while (transform.childCount > 0) {
    DestroyImmediate(transform.GetChild(0).gameObject);
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #unity #destroy #children
ADD COMMENT
Topic
Name
7+5 =