Version: 2023.1

Awaitable.EndOfFrameAsync

切换到手册
public static Awaitable EndOfFrameAsync (CancellationToken cancellationToken);

参数

cancellationToken Optional cancellation token used to signal cancellation.

描述

Awaitable resuming after all Unity subsystem have run for the current frame.

private async Awaitable DoSomethingAsync()
{
   Debug.Log("Before game systems got updated for current thread");
   await Awaitable.EndOfFrameAsync();
   Debug.Log("After game systems got updated for current thread");
}