unity get children of object code example
Example 1: unity get child
GameObject Child;
Child = transform.GetChild(0).gameObject;
Example 2: unity get all children
foreach (Transform child in parent) {
//Your code
}
Example 3: get all child gameObject of gameObject C#
foreach (Transform child in transform)