기술 자료

Unity Engine

Unity Engine

Cancel()

Cancels the awaitable. If the awaitable is being awaited, the awaiter receives a System.OperationCanceledException.
읽는 시간 1분최근 업데이트: 한 달 전

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule
public void Cancel()

Remarks

Note: Some methods returning an
Awaitable
also accept a
CancellationToken
, such as Awaitable.WaitForSecondsAsync and Awaitable.NextFrameAsync. For such methods, both cancellation models are equivalent: whether you call
Awaitable.Cancel
directly or trigger the supplied
CancellationToken
, the awaiter receives an
OperationCanceledException
.