Skip to main content

CoroutineYields

A static class in Alta.Coroutines, the global namespace.

Static cache of coroutine yield objects, so coroutines can reuse them instead of allocating new ones each time.

Fields​

3 private and internal fields
MemberWhat it is
private static WaitForEndOfFrame endOfFrameBacking field for EndOfFrame.
private static WaitForFixedUpdate fixedUpdateBacking field for FixedUpdate.
private static Dictionary<float, WaitForSeconds> timedYieldsCache of WaitForSeconds objects keyed by time, compared with a 0.01 second tolerance.

Properties​

MemberWhat it is
static WaitForEndOfFrame EndOfFrame { get; }A shared WaitForEndOfFrame.
static WaitForFixedUpdate FixedUpdate { get; }A shared WaitForFixedUpdate.

Methods​

MemberWhat it is
static WaitForSeconds WaitForSeconds(float seconds)Returns a cached WaitForSeconds for the given time, creating it on first use. Times within 0.01 seconds count as the same.