# Cancel(int)

> Cancels a runnning progress indicator, and invokes the cancel callback for the associated task.

## Definition

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

```csharp
public static bool Cancel(int id)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The progress indicator's unique ID.

### Returns

| Type                                                          | Description                                                                |
| ------------------------------------------------------------- | -------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the associated task is cancelled, false if it cannot be cancelled. |

### Remarks

You can only call this method if a cancel callback has been registered for the specified **id**.

Additional Resources: [Progress.RegisterCancelCallback](/engine/6000.7/script-reference/unityeditor/progress/registercancelcallback.md), [Progress.UnregisterCancelCallback](/engine/6000.7/script-reference/unityeditor/progress/unregistercancelcallback.md).
