RevertPrefabInstance
Reverts all overrides on a Prefab instance.
Read time 1 minuteLast updated 12 days ago
Definition
- Type: Method
- Namespace: UnityEditor
- Assembly: UnityEditor.CoreModule
RevertPrefabInstance(GameObject)
Reverts all overrides on a Prefab instance.
public static bool RevertPrefabInstance(GameObject go)
Parameters
Returns
Type | Description |
|---|---|
| bool |
Remarks
This reverts all property overrides, added and removed components, and added child GameObjects (including added child Prefab instances).
The Transform position and rotation of a root GameObject in a Prefab instance is not cleared, nor are other default override properties.
RevertPrefabInstance(GameObject, InteractionMode)
Reverts all overrides on a Prefab instance.
public static void RevertPrefabInstance(GameObject instanceRoot, InteractionMode action)
Parameters
The root of the Prefab instance.
The interaction mode for this action.
Remarks
This reverts all property overrides, added and removed components, and added child GameObjects (including added child Prefab instances).
The Transform position and rotation of a root GameObject in a Prefab instance is not cleared, nor are other default override properties.