Unity创建或克隆对象 Instantiate()

//需要创建对象

GameObject prefab;

//创建对象的规定位置或父物体

Transform tr;

//创建出对象

Instantiate(prefab);

//创建对象,并设定位置和角度

Instantiate(prefab,tr.position,tr.rotation);

//是创建出来的对象是子对象

Instantiate(prefab,tr);

原文地址:https://www.cnblogs.com/Prode/p/9936743.html