Class AwaitableUtils<T>
Utils to help with the Awaitable<T> class in Unity 6.0 or newer.
Inherited Members
Namespace: Unity.XR.CoreUtils
Assembly: Unity.XR.CoreUtils.dll
Syntax
public static class AwaitableUtils<T>
Type Parameters
| Name | Description |
|---|---|
| T | The awaited result type. |
Methods
FromResult(T)
An Awaitable equivalent to C#'s Task.FromResult.
Declaration
public static Awaitable<T> FromResult(T result)
Parameters
| Type | Name | Description |
|---|---|---|
| T | result |
Returns
| Type | Description |
|---|---|
| Awaitable<T> |
Remarks
This method isn't thread-safe.