把Arraylist轉換成GameObject[]

ArrayList a = new ArrayList();
GameObject g = new GameObject("g");
a.Add(g);
GameObject[] go = (GameObject[])a.ToArray(typeof(GameObject));
相關文章
相關標籤/搜索