//需要创建对象
GameObject prefab;
//创建对象的规定位置或父物体
Transform tr;
//创建出对象
Instantiate(prefab);
//创建对象,并设定位置和角度
Instantiate(prefab,tr.position,tr.rotation);
//是创建出来的对象是子对象
Instantiate(prefab,tr);
//需要创建对象
GameObject prefab;
//创建对象的规定位置或父物体
Transform tr;
//创建出对象
Instantiate(prefab);
//创建对象,并设定位置和角度
Instantiate(prefab,tr.position,tr.rotation);
//是创建出来的对象是子对象
Instantiate(prefab,tr);
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。