array with all children of a transfomr code example
Example 1: unity array of child objects
Transform[] children = GetComponentsInChildren<Transform>();
Example 2: how to get array of children transform
foreach (Transform child in transform){
// Do something to child
}