public GameObject[] Cubes = new GameObject[5];

GameObject myCube;

// Use this for initialization

void Start () {

myCube = GameObject.Find("Cube3");

int i = Array.IndexOf(Cubes, myCube);

print ("myCube index is " + i);

}




'Computer Language > 유니티' 카테고리의 다른 글

이차원 배열 getUpperBound []<- []  (0) 2014.05.16
이차원 배열 선언과 동시에 초기화  (0) 2014.05.16
c# array2  (0) 2014.05.16
c# array  (0) 2014.05.16
int[] a -> System.Array  (0) 2014.05.16

+ Recent posts