Coroutine
namespace Griff.Runtime;
public sealed class CoroutineA sequence that runs over several frames, started with a behavior’s StartCoroutine or StartCoroutine. It runs right away up to its first yield return, then picks up again once what it yielded is done:
null: the next frame.Wait(seconds)(or just a number of seconds): that much game time.WaitUntil(() => ...)andWaitWhile(() => ...): a condition, checked every frame.- A
Tween,GameTimeror anotherCoroutine: when it finishes. - Another
IEnumeratormethod: runs it to the end first, like calling it. Like timers, coroutines run on game time, so they slow down withScaleand stop while the game is paused.
Properties
Section titled “Properties”IsRunning
Section titled “IsRunning”public bool IsRunning { get; }False once the coroutine has finished or been stopped.
OwnerEntity
Section titled “OwnerEntity”public Entity? OwnerEntity { get; }The entity whose removal stops this coroutine, if any.
Methods
Section titled “Methods”public void Stop()