📜  实例化 prefab unity - C# 代码示例

📅  最后修改于: 2022-03-11 14:48:58.210000             🧑  作者: Mango

代码示例6
using UnityEngine;
using System.Collections;

public class Instantiate_example : MonoBehaviour 
{ 
  public Transform prefab;
  void Start() 
  { 
     Instantiate(prefab, new Vector3(2.0F, 0, 0), Quaternion.identity);
  } 
}