Tran POS[] = new Transform[transform.childCount]; //得到子物体的长度 for (int i = 0; i < POS.Length; i++) { POS[i] = transform.GetChild(i); }