# RegisterCancelCallback(Func<bool>)

> Registers a callback that is called when the user cancels a running progress indicator's associated task.

## Definition

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

```csharp
public void RegisterCancelCallback(Func<bool> callback)
```

### Parameters

**** (\[Func\<bool>]\(https\://learn.microsoft.com/dotnet/api/system.func-1)): The function called when a progress indicator's associated task is canceled.

### Remarks

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