📜  Unity C# 实例化预制件 - C# 代码示例

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

代码示例3
GameObject prefab = reference_to_your_prefab_asset;
Vector3 position = Vector3.zero;
Quaternion rotation = Quaternion.identity;
Transform parent = parent_of_instantiated_prefab;

Instantiate(prefab, position, rotation, parent);