//需要创建对象

GameObject prefab;

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

Transform tr;

//创建出对象

Instantiate(prefab);

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

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

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

Instantiate(prefab,tr);

相关文章:

  • 2021-10-13
  • 2021-10-24
  • 2021-12-30
  • 2022-03-11
  • 2021-10-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-02-17
  • 2021-06-29
  • 2022-01-25
  • 2021-12-14
  • 2021-12-23
相关资源
相似解决方案