Skip to content

Wait class ​

Namespace Lustral · Assembly Lustral.Api

A condition that a coroutine waits for: yield return Wait.Seconds(1).

csharp
public sealed class Wait

Properties ​

FixedUpdate ​

csharp
public static Wait FixedUpdate { get; }

The next physics step (FixedUpdate), as Unity's WaitForFixedUpdate.

LateUpdate ​

csharp
public static Wait LateUpdate { get; }

After the game's LateUpdate methods in the current frame, or in the next frame if they have already run.

NextFrame ​

csharp
public static Wait NextFrame { get; }

The next frame, after the game's Update methods. Equivalent to yield return null.

Methods ​

Frames(int) ​

csharp
public static Wait Frames(int frames);

The specified number of frames; 1 is the next frame.

RealSeconds(double) ​

csharp
public static Wait RealSeconds(double seconds);

The specified duration in real time, regardless of the game's time scale, as Unity's WaitForSecondsRealtime.

Seconds(double) ​

csharp
public static Wait Seconds(double seconds);

The specified duration in game time, as Unity's WaitForSeconds: it is affected by the game's time scale and does not elapse while the game is paused. In game builds where Lustral cannot read Unity's time, real time is used.

Until(Func<bool>) ​

csharp
public static Wait Until(Func<bool> condition);

Until the condition is true. The condition is checked immediately, then once per frame after Update.

While(Func<bool>) ​

csharp
public static Wait While(Func<bool> condition);

While the condition is true. The condition is checked immediately, then once per frame after Update.

Mods are third-party software. Lustral does not verify their behavior and is not responsible for any damage they cause.