All pages
Powered by GitBook
1 of 1

Loading...

SScriptingData

Index

Functions Index

Function Name

Properties Index

Property Name

Functions

GetVariable

object GetVariable (string name)

Return the object of the variable.

Parameter
Type
Description

SetVariable

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

Set properties to variable.

Parameter
Type
Description

Properties

Enabled

bool Enabled get set

Is the ScriptingData component Enabled?

Variables

string[] Variables get

Property Description

ComponentName

string ComponentName get

The name of this component.

GameObject

GameObject get

Property Description

object GetVariable (string name)

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

bool Enabled get set

string[] Variables get

string ComponentName get

SGameObject GameObject get

SGameObject
Space.Host.ExecutingObject.Data.GetVariable("variableName")
Space.Host.ExecutingObject.SetVariable("variableName",5,true)
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)
variableNames = Space.Host.ExecutingObject.Data.Variables
componentName = Space.Host.ExecutingObject.Data.ComponentName
theGameObject = Space.Host.ExecutingObject.Data.GameObject