# OnFinish(EditorActionResult)

> Callback raised when the EditorAction is finished.

## Definition

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

```csharp
protected virtual void OnFinish(EditorActionResult result)
```

### Parameters

**** (\[EditorActionResult]\(/engine/6000.7/script-reference/unityeditor/actions/editoractionresult)): The state that the [EditorAction](/engine/6000.7/script-reference/unityeditor/actions/editoraction.md) was finished in.

### Remarks

This function is responsible for finalizing and cleaning up any state created by the [EditorAction](/engine/6000.7/script-reference/unityeditor/actions/editoraction.md).

When the [EditorActionResult](/engine/6000.7/script-reference/unityeditor/actions/editoractionresult.md) is cancelled, remove any created artifacts from the scene. When the result is [EditorActionResult.Success](/engine/6000.7/script-reference/unityeditor/actions/editoractionresult/success.md), clean up any temporary resources and commit the finalized objects to the scene.
