# Action

> Unity calls this function when the user accepts an edited name, either by pressing the Enter key or by losing the keyboard input focus.

## Definition

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

## Action(EntityId, string, string)

Unity calls this function when the user accepts an edited name, either by pressing the Enter key or by losing the keyboard input focus.

> **Warning:**
>
> **Removed.** EndNameEditAction is obsolete. Use AssetCreationEndAction that uses EntityId instead of int for instance IDs.

```csharp
public override void Action(EntityId entityId, string pathName, string resourceFile)
```

### Parameters

**** (\[EntityId]\(/engine/6000.6/script-reference/unityengine/entityid)): **** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The path to the asset.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The resource file string argument passed to ProjectWindowUtil.StartNameEditingIfProjectWindowExists.

## Action(int, string, string)

Unity calls this function when the user accepts an edited name, either by pressing the Enter key or by losing the keyboard input focus.

> **Warning:**
>
> **Removed.** EndNameEditAction is obsolete. Use AssetCreationEndAction that uses EntityId instead of int for instance IDs.

```csharp
public abstract void Action(int instanceId, string pathName, string resourceFile)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The instance ID of the edited asset.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The path to the asset.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The resource file string argument passed to ProjectWindowUtil.StartNameEditingIfProjectWindowExists.
