SScriptingRuntime
Index
Functions Index
SResource GetResource (string name)
void CallScriptFunction (string name, params DynValue[] arguments) void CallScriptFunction (string name)
void Reset ()
object GetPublicVariable (string name)
void SetPublicVariable (string name, DynValue property, bool persistent=false)
void InvokeEvent (string name)
Properties Index
Functions
GetResource
SResource GetResource (string name)
Get the resource by its name and return it.
resource = Space.Host.ExecutingObject.Script.GetResource("resource name")
CallScriptFunction
void CallScriptFunction (string name, params DynValue[] arguments) void CallScriptFunction (string name)
Call registered script function with specified arguments.
resource = Space.Host.ExecutingObject.Script.CallScriptFunction("FunctionName")
--or
resource = Space.Host.ExecutingObject.Script.CallScriptFunction("FunctionName", tableWithArguments)
Reset
void Reset ()
Reset event members to their initial values.
Space.Host.ExecutingObject.Script.Reset()
GetPublicVariable
object GetPublicVariable (string name)
Gets the public variable by its name and return it.
publicVariable = Space.Host.ExecutingObject.Script.GetPublicVariable("variableName")
SetPublicVariable
void SetPublicVariable (string name, DynValue property, bool persistent=false)
Set the property to public variable with name "name".
Space.Host.ExecutingObject.Script.SetPublicVariable("VariableName",5,true)
InvokeEvent
void InvokeEvent (string name)
Invokes the event with the name "name".
Space.Host.ExecutingObject.Script.InvokeEvent("EventName")
Properties
Resources
SResource[] Resources get
Return a list of resource.
tableResources = Space.Host.ExecutingObject.Script.Resources
Enabled
bool Enabled get
set
Whether the scripting runtime component is Enabled.
Space.Host.ExecutingObject.Script.Enabled = true
ComponentName
string ComponentName get
The name of this component.
componentName = Space.Host.ExecutingObject.Script.ComponentName
GameObject
SGameObject GameObject get
Property Description
theGameObject = Space.Host.ExecutingObject.Script.GameObject