Skip to content

Get Sansar

Script API

ICoroutine

Where: Client
More page actions

For the complete documentation index, see llms.txt. This page is also available as Markdown.

Interface Namespace Sansar.Script

Token representing a coroutine.

public interface ICoroutine

Remarks

Manages an existing coroutine.

Members at a glance

KindMembers
PropertiesIsAlive · IsWaiting · Name
MethodsAbort · 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

Generated from the Sansar 47.10.0 client ScriptApi snapshot.