摘要: cube目录下有n个cube,可不可以一下子遍历出所有的对象,而不用一个一个的find?find(“Cube1”) 1、foreach(Transform ts in cube) 2、cube.getCompontsInChildren 返回transform的数组 3、GameObject[] gos; gos = GameObject.FindGameObjectsWithTag("Enemy"); 阅读全文
posted @ 2014-05-23 13:36 zhibolife 阅读(1741) 评论(0) 推荐(0) 编辑