Sinespace Client 2025.3.19431
Client-side scripting for Sinespace
SineSpace.Scripting.Components.SScriptingData Class Reference
Inheritance diagram for SineSpace.Scripting.Components.SScriptingData:
ScriptClassComponent< T > ScriptClass< T > ScriptClassWrapper< T > ScriptClass

Public Member Functions

object GetVariable (string name)
 Return the object of the variable.
 
void SetVariable (string name, DynValue property, bool persistent=false)
 Set the "property" to variable.
 
- Public Member Functions inherited from ScriptClassWrapper< T >
override void Initialise (SScript runtime, object wrapper)
 
- Public Member Functions inherited from ScriptClass
void ReportError (string error, bool fatal, UnityEngine.Object target=null)
 
void Initialise (SScript runtime, object wrapper)
 

Properties

bool Enabled [get, set]
 Return whether the ScriptingData component is Enabled or not.
 
string ComponentName [get]
 Return the component name of the scripting data.
 
string[] Variables [get]
 This return a list of variables.
 
- Properties inherited from ScriptClassComponent< T >
SGameObject GameObject [get]
 Return the GameObject which component added.
 
- Properties inherited from ScriptClass< T >
override bool Alive [get]
 Return if the component is alive.
 
- Properties inherited from ScriptClassWrapper< T >
_wrap [get]
 
- Properties inherited from ScriptClass
virtual bool Alive [get]
 
DynValue CachedData [get, set]
 

Additional Inherited Members

- Protected Member Functions inherited from ScriptClass
void Initialise (SScript runtime)
 

Member Function Documentation

◆ GetVariable()

object SineSpace.Scripting.Components.SScriptingData.GetVariable ( string name)

Return the object of the variable.

local thisObject=Space.Host.ExecutingObject
local thisObjectVariable=thisObject.Data.Variables
for i=1, #thisObjectVariable do
Space.Log(thisObjectVariable[i])
end
Parameters
nameThe name of variable

◆ SetVariable()

void SineSpace.Scripting.Components.SScriptingData.SetVariable ( string name,
DynValue property,
bool persistent = false )

Set the "property" to variable.

local thisObject=Space.Host.ExecutingObject
thisObjectData.SetVariable(no1Name,"no1",false)
Space.Log(no1)
&ndash;Set "no1" to "no1"
Parameters
name
propertyThe value in a lua/MoonSharp script
persistent

Property Documentation

◆ ComponentName

string SineSpace.Scripting.Components.SScriptingData.ComponentName
get

Return the component name of the scripting data.

local thisObject=Space.Host.ExecutingObject
local data=thisObject.Data
Space.Log(data.ComponentName)

◆ Enabled

bool SineSpace.Scripting.Components.SScriptingData.Enabled
getset

Return whether the ScriptingData component is Enabled or not.

local thisObject=Space.Host.ExecutingObject
local thisObjectData=thisObject.Data
Space.Log(thisObjectData.Enabled)

◆ Variables

string [] SineSpace.Scripting.Components.SScriptingData.Variables
get

This return a list of variables.

local thisObject=Space.Host.ExecutingObject
local thisObjectVariable=thisObject.Data.Variables
for i=1, #thisObjectVariable do
Space.Log(thisObjectVariable[i])
end