var childCount : int
Description描述
The number of children the Transform has.
变换的子物体数量。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
public void Awake() {
print(transform.childCount);
}
}
// print the number of child objects
//打印物体的子物体数
print(transform.childCount);