Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

Unity Children Destroy

 //put in any gameobject having children and enter playmode
        while (transform.childCount > 0)
        {
            DestroyImmediate(transform.GetChild(0).gameObject);
        }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Unity #Children #Destroy
ADD COMMENT
Topic
Name
4+6 =