unity how to get all the child from an object code example
Example 1: unity get all children
foreach (Transform child in parent) {
//Your code
}
Example 2: get all child gameObject of gameObject C#
foreach (Transform child in transform)
foreach (Transform child in parent) {
//Your code
}
foreach (Transform child in transform)