# RevertPrefabInstance

> Reverts all overrides on a Prefab instance.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor](/engine/6000.7/script-reference/unityeditor.md)
* **Assembly:** UnityEditor.CoreModule

## RevertPrefabInstance(GameObject)

Reverts all overrides on a Prefab instance.

> **Warning:**
>
> **Deprecated.** Use the overload that takes an InteractionMode parameter.

```csharp
public static bool RevertPrefabInstance(GameObject go)
```

### Parameters

**** (\[GameObject]\(/engine/6000.7/script-reference/unityengine/gameobject)):&#x20;

### Returns

| Type                                                          | Description |
| ------------------------------------------------------------- | ----------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) |             |

### 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](/engine/6000.7/script-reference/unityeditor/prefabutility/isdefaultoverride.md) properties.

## RevertPrefabInstance(GameObject, InteractionMode)

Reverts all overrides on a Prefab instance.

```csharp
public static void RevertPrefabInstance(GameObject instanceRoot, InteractionMode action)
```

### Parameters

**** (\[GameObject]\(/engine/6000.7/script-reference/unityengine/gameobject)): The root of the Prefab instance.**** (\[InteractionMode]\(/engine/6000.7/script-reference/unityeditor/interactionmode)): 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](/engine/6000.7/script-reference/unityeditor/prefabutility/isdefaultoverride.md) properties.
