把Arraylist转换成GameObject[]

ArrayList a = new ArrayList();
GameObject g = new GameObject("g");
a.Add(g);
GameObject[] go = (GameObject[])a.ToArray(typeof(GameObject));

 

posted @ 2015-06-17 14:44  softimagewht  阅读(402)  评论(0编辑  收藏  举报