SScriptingData
Index
Functions Index
Function Name
object GetVariable (string name)
void SetVariable (string name, DynValue property, bool persistent=false)
Properties Index
Property Name
Functions
GetVariable
object GetVariable (string name)
Return the object of the variable.
Parameter
Type
Description
Space.Host.ExecutingObject.Data.GetVariable("variableName")
SetVariable
void SetVariable (string name, DynValue property, bool persistent=false)
Set properties to variable.
Parameter
Type
Description
Space.Host.ExecutingObject.SetVariable("variableName",5,true)
Properties
Enabled
bool Enabled get
set
Is the ScriptingData component Enabled?
Space.Host.ExecutingObject.Data.Enabled = false
--clicking this object will Enable/Disable it's Scripting Data component
thisGameObject = Space.Host.ExecutingObject
component = thisGameObject.Data
OnClick = function()
component.Enabled = not component.Enabled
end
thisGameObject.AddClickable()
thisGameObject.Clickable.OnClick(OnClick)
Variables
string[] Variables get
Property Description
variableNames = Space.Host.ExecutingObject.Data.Variables
ComponentName
string ComponentName get
The name of this component.
componentName = Space.Host.ExecutingObject.Data.ComponentName
GameObject
SGameObject GameObject get
Property Description
theGameObject = Space.Host.ExecutingObject.Data.GameObject