Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


AwaitableCompletionSource<T>

Objects allowing to control completion of an Awaitable object from user code.
Read time 1 minuteLast updated 7 days ago

Definition

  • Type: Class
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule
public class AwaitableCompletionSource<T>

Properties

Property

Description

AwaitableGet the awaitable controlled by the completion source.

Methods

Method

Description

ResetReset the completion source (this will set the Awaitable property to a new Awaitable object).
SetCanceledRaise cancellation.
SetExceptionRaise completion with an exception.
SetResultRaise completion.
TrySetCanceledRaise cancellation (returns false if the awaitable was already completed or canceled).
TrySetExceptionRaise completion with an exception.
TrySetResultRaise the awaitable completion.