//外面接收克隆对象的模板
public GameObject prefabObj;
// Use this for initialization
void Start () {
for (int i = 0; i < 5; i++)
{
//克隆复制操作
//后面我们需要转为GameObject格式,否则格式不同无法工作
GameObject table = GameObject.Instantiate(prefabObj, new Vector3(2*i, 0, 0), Quaternion.identity) as GameObject;
}
}
Unity克隆游戏对象
最新推荐文章于 2025-01-26 15:41:27 发布
726

被折叠的 条评论
为什么被折叠?



