# RevertAddedGameObject(GameObject, InteractionMode)

> Removes this added GameObject from a Prefab instance.

## Definition

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

```csharp
public static void RevertAddedGameObject(GameObject gameObject, InteractionMode action)
```

### Parameters

**** (\[GameObject]\(/engine/6000.0/script-reference/unityengine/gameobject)): The added GameObject on the Prefab instance to revert.**** (\[InteractionMode]\(/engine/6000.0/script-reference/unityeditor/interactionmode)): The interaction mode for this action.

### Remarks

After the revert action, the GameObject and its children no longer exist.

This method also works if the added child GameObject is a Prefab instance.
