# Finish(EditorActionResult)

> Finishes an EditorAction with a specific result.

## Definition

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

```csharp
public void Finish(EditorActionResult result)
```

### Parameters

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

### Remarks

Call this method to forcibly end an active [EditorAction](/engine/6000.5/script-reference/unityeditor/actions/editoraction.md) with a [EditorActionResult](/engine/6000.5/script-reference/unityeditor/actions/editoractionresult.md). A common use is when implementing atomic actions that do not require interactivity.

### Examples

```csharp
using UnityEngine;
using UnityEditor;
using UnityEditor.Actions;

public class SingleFrameActionSample : EditorAction
{
    [MenuItem("Test/Start Single Frame Action")]
    static void StartEditorActionSample()
    {
        Start(new SingleFrameActionSample(4));
    }

    int m_Value;

    public SingleFrameActionSample(int value)
    {
        m_Value = value;
        Finish(EditorActionResult.Success);
    }

    protected override void OnFinish(EditorActionResult result)
    {
        m_Value += 2;
        Debug.Log($"Action Finished [{result}] with value: {m_Value}");
    }
}
```
