ReplacePrefab
Replaces the targetPrefab with a copy of the game object hierarchy go.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前
Definition
- Type: Method
- Namespace: UnityEditor
- Assembly: UnityEditor
ReplacePrefab(GameObject, Object)
Replaces the targetPrefab with a copy of the game object hierarchy go.
public static GameObject ReplacePrefab(GameObject go, Object targetPrefab)
Parameters
Returns
Type | Description |
|---|---|
| GameObject |
Remarks
Returns the Prefab game object after it has been created. If connectToPrefab is enabled go will be made an instance of the created Prefab.
ReplacePrefab(GameObject, Object, ReplacePrefabOptions)
Replaces the targetPrefab with a copy of the game object hierarchy go.
public 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 connectToPrefab is enabled go will be made an instance of the created Prefab.