# TrySetCanceled()

> Raise cancellation (returns false if the awaitable was already completed or canceled).

## Definition

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

```csharp
public bool TrySetCanceled()
```

### Returns

| Type                                                          | Description                                           |
| ------------------------------------------------------------- | ----------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | Indicates if the cancellation was successfuly raised. |
