Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

Unity Destroy All Children

void Update()
    {
    //put in any gameobject having children and enter playmode
        foreach (Transform child in transform)
        {
            Destroy(child.gameObject);
        }
    }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Unity #Destroy #All #Children
ADD COMMENT
Topic
Name
2+6 =