All pages
Powered by GitBook
1 of 1

Loading...

SScriptingRuntime

Index

Functions Index

Function Name

Properties Index

Property Name

Functions

GetResource

GetResource (string name)

Get the resource by its name and return it.

Parameter
Type
Description

CallScriptFunction

void CallScriptFunction (string name, params DynValue[] arguments) void CallScriptFunction (string name)

Call registered script function with specified arguments.

Parameter
Type
Description

Reset

void Reset ()

Reset event members to their initial values.

GetPublicVariable

object GetPublicVariable (string name)

Gets the public variable by its name and return it.

Parameter
Type
Description

SetPublicVariable

void SetPublicVariable (string name, DynValue property, bool persistent=false)

Set the property to public variable with name "name".

Parameter
Type
Description

InvokeEvent

void InvokeEvent (string name)

Invokes the event with the name "name".

Parameter
Type
Description

Properties

Resources

[] Resources get

Return a list of resource.

Enabled

bool Enabled get set

Whether the scripting runtime component is Enabled.

ComponentName

string ComponentName get

The name of this component.

GameObject

GameObject get

Property Description

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)

SResource[] Resources get

bool Enabled get set

string ComponentName get

SGameObject GameObject get

SResource
SResource
SGameObject
resource = Space.Host.ExecutingObject.Script.GetResource("resource name")
resource = Space.Host.ExecutingObject.Script.CallScriptFunction("FunctionName")
--or
resource = Space.Host.ExecutingObject.Script.CallScriptFunction("FunctionName", tableWithArguments)
Space.Host.ExecutingObject.Script.Reset()
publicVariable = Space.Host.ExecutingObject.Script.GetPublicVariable("variableName")
Space.Host.ExecutingObject.Script.SetPublicVariable("VariableName",5,true)
Space.Host.ExecutingObject.Script.InvokeEvent("EventName")
tableResources = Space.Host.ExecutingObject.Script.Resources
Space.Host.ExecutingObject.Script.Enabled = true
componentName = Space.Host.ExecutingObject.Script.ComponentName
theGameObject = Space.Host.ExecutingObject.Script.GameObject