Table of Contents

Class WaitTimeOrSignal

Namespace
ONITwitchLib
Assembly
ONITwitchLib.dll

A class for use in Unity coroutines that continues execution after a duration has elapsed, or a function signals to continue, whichever comes first.

[PublicAPI]
public class WaitTimeOrSignal : CustomYieldInstruction, IEnumerator
Inheritance
CustomYieldInstruction
WaitTimeOrSignal
Implements
Inherited Members
CustomYieldInstruction.MoveNext()
CustomYieldInstruction.Reset()
CustomYieldInstruction.Current

Constructors

WaitTimeOrSignal(float, Func<bool>)

Initializes the time and signal.

[PublicAPI]
public WaitTimeOrSignal(float time, Func<bool> signal)

Parameters

time float

The amount of time, in unscaled real-time seconds to wait.

signal Func<bool>

A function that returns true if the wait should end early, or false otherwise.

Properties

keepWaiting

Whether this delay should continue to wait.

public override bool keepWaiting { get; }

Property Value

bool