Transform.childCount Manual     Reference     Scripting  
Scripting > Runtime Classes > Transform
Transform.childCount

var childCount : int

Description

The number of children the Transform has.

JavaScripts
// print the number of child objects
print(transform.childCount);

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
void Awake() {
print(transform.childCount);
}
}

import UnityEngine
import System.Collections

class example(MonoBehaviour):

def Awake():
print(transform.childCount)