Sinespace Client 2025.3.19431
Client-side scripting for Sinespace
|
Public Member Functions | |
override void | Initialise (SScript runtime, object wrapper) |
void | SetGlobal (string ns, string key, DynValue value) |
void | SetSuperGlobal (string ns, string key, DynValue value) |
DynValue | GetGlobal (string ns, string key) |
Retrieves a previously set global variable, or returns nil. | |
DynValue | GetSuperGlobal (string ns, string key) |
Retrieves a previously set superglobal variable, or returns nil. | |
void | RegisterFunction (string ns, string func, Closure reference) |
void | RegisterBroadcastFunction (string ns, string func, Closure reference) |
void | UnregisterBroadcastFunction (string ns, string func, Closure reference) |
void | UnregisterBroadcastFunction (string ns, string func) |
void | CallFunction (string ns, string func, IEnumerable< DynValue > args) |
int | CallBroadcastFunction (string ns, string func, IEnumerable< DynValue > args) |
Calls every registered broadcast function with specified arguments, and returns the number of calls queued. | |
![]() | |
void | ReportError (string error, bool fatal, UnityEngine.Object target=null) |
void | Initialise (SScript runtime, object wrapper) |
Additional Inherited Members | |
![]() | |
void | Initialise (SScript runtime) |
![]() | |
virtual bool | Alive [get] |
DynValue | CachedData [get, set] |
int SineSpace.Scripting.Client.SShared.CallBroadcastFunction | ( | string | ns, |
string | func, | ||
IEnumerable< DynValue > | args ) |
Calls every registered broadcast function with specified arguments, and returns the number of calls queued.
Functions will be called at the start of their next execution context, which may be in the next frame.
ns | |
func | |
args |
void SineSpace.Scripting.Client.SShared.CallFunction | ( | string | ns, |
string | func, | ||
IEnumerable< DynValue > | args ) |
DynValue SineSpace.Scripting.Client.SShared.GetGlobal | ( | string | ns, |
string | key ) |
Retrieves a previously set global variable, or returns nil.
These variables are shared between scripts, hence a namespace is required
ns | A namespace, suggest using reverse-DNS ordering, e.g. com.sinewaveentertainment.someScript |
key | A individual key name for a variable |
DynValue SineSpace.Scripting.Client.SShared.GetSuperGlobal | ( | string | ns, |
string | key ) |
Retrieves a previously set superglobal variable, or returns nil.
Unlike globals, superglobals are not reset by a teleport to another scene.
These variables are shared between scripts, hence a namespace is required
ns | A namespace, suggest using reverse-DNS ordering, e.g. com.sinewaveentertainment.someScript |
key | A individual key name for a variable |
override void SineSpace.Scripting.Client.SShared.Initialise | ( | SScript | runtime, |
object | wrapper ) |
void SineSpace.Scripting.Client.SShared.RegisterBroadcastFunction | ( | string | ns, |
string | func, | ||
Closure | reference ) |
void SineSpace.Scripting.Client.SShared.RegisterFunction | ( | string | ns, |
string | func, | ||
Closure | reference ) |
void SineSpace.Scripting.Client.SShared.SetGlobal | ( | string | ns, |
string | key, | ||
DynValue | value ) |
void SineSpace.Scripting.Client.SShared.SetSuperGlobal | ( | string | ns, |
string | key, | ||
DynValue | value ) |
void SineSpace.Scripting.Client.SShared.UnregisterBroadcastFunction | ( | string | ns, |
string | func ) |
void SineSpace.Scripting.Client.SShared.UnregisterBroadcastFunction | ( | string | ns, |
string | func, | ||
Closure | reference ) |