Token representing a coroutine.
public interface ICoroutineRemarks
Manages an existing coroutine.
Members at a glance
| Kind | Members |
|---|---|
| Properties | IsAlive · IsWaiting · Name |
| Methods | Abort · ResetSignals · Signal |
Properties
IsAlive
public bool IsAlive { get; }Is this coroutine is still working or waiting.
Value: bool — Will return false if this coroutine has completed or had Abort() called on it or thrown an exception.
IsWaiting
public bool IsWaiting { get; }Is the coroutine waiting.
Value: bool — True if the coroutine is waiting for time or an event.
Name
public string Name { get; set; }The name of the coroutine.
Remarks
By default the function name, but can be overwritten by anyone with the ICoroutine interface handle.
Methods
Abort
public void Abort()Stop the coroutine
Remarks
The coroutine will be deleted and will not run again.
ResetSignals
public void ResetSignals()Reset the signal count on a coroutine.
Remarks
Will not re-sleep a coroutine that was waiting on signals.
Signal
public void Signal()Send a signal to the coroutine and wake it up if it is waiting for a signal.
Used in examples
- AdvancedCoroutineExample.cs
- ScriptLibrary/Scene/Light.cs
- ScriptLibrary/Scene/LightOnOff.cs
- ScriptLibrary/Scene/Sound.cs
- ScriptLibrary/Scene/TimeCountdown.cs
- ScriptLibrary/Scene/TimedEvents.cs
Generated from the Sansar 47.10.0 client ScriptApi snapshot.