unity get child count code example
Example 1: unity get number of child objects
// The number of child objects is given by:
GameObject.transform.childCount;
Example 2: get all child gameObject of gameObject C#
foreach (Transform child in transform)