ReplacePrefab
Replaces the targetPrefab with a copy of the game object hierarchy go.
阅读时间1 分钟最后更新于 1 个月前
Definition
- Type: Method
- Namespace: UnityEditor
- Assembly: UnityEditor.CoreModule
ReplacePrefab(GameObject, Object)
Replaces the with a copy of the game object hierarchy .
targetPrefabgopublic static GameObject ReplacePrefab(GameObject go, Object targetPrefab)
Parameters
Returns
Type | Description |
|---|---|
| GameObject |
Remarks
Returns the Prefab game object after it has been created. If is enabled will be made an instance of the created Prefab.
connectToPrefabgoReplacePrefab(GameObject, Object, ReplacePrefabOptions)
Replaces the with a copy of the game object hierarchy .
targetPrefabgopublic static GameObject ReplacePrefab(GameObject go, Object targetPrefab, ReplacePrefabOptions replaceOptions)
Parameters
Returns
Type | Description |
|---|---|
| GameObject |
Remarks
Returns the Prefab game object after it has been created. If is enabled will be made an instance of the created Prefab.
connectToPrefabgo