AsyncOperationExt.Wait Method
Creates an awaitable Task that finishes when the given AsyncOperation finished.
Namespace: UltimateXR.Extensions.Unity.IO
Assembly: UltimateXR (in UltimateXR.dll) Version: 0.0.0.0
Syntax
C#
public static Task<AsyncOperation> Wait(
this AsyncOperation self,
CancellationToken ct = default
)
Parameters
- self
- Type: AsyncOperation
Unity asynchronous operation object - ct (Optional)
- Type: System.Threading.CancellationToken
Optional cancellation token, to cancel the operation
Return Value
Type: Task(AsyncOperation)
Awaitable Task returning the caller AsyncOperation object
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type AsyncOperation. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also
Reference
AsyncOperationExt Class
UltimateXR.Extensions.Unity.IO Namespace