# Cancelled

> Unity calls this function when the user presses the Escape key to cancel editing a name.

## Definition

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

## Cancelled(EntityId, string, string)

Unity calls this function when the user presses the Escape key to cancel editing a name.

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

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

### Parameters

**** (\[EntityId]\(/engine/6000.5/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.

## Cancelled(int, string, string)

Unity calls this function when the user presses the Escape key to cancel editing a name.

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

```csharp
public virtual void Cancelled(int instanceId, string pathName, string resourceFile)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The instance ID of the asset that the user attempted to edit.**** (\[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.
