Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# unity destroy first child object

public GameObject targetParent; // Drag parent in the inspector

// Destory first child object
Destroy(targetParent.transform.GetChild(0).gameObject);
 
PREVIOUS NEXT
Tagged: #unity #destroy #child #object
ADD COMMENT
Topic
Name
5+1 =