unity children to array code example Example: unity array of child objects Transform[] children = GetComponentsInChildren<Transform>();