All pages
Powered by GitBook
1 of 10

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Region

SRenderSettings

Index

Functions Index

Function Name

Properties Index

Property Name

Functions

SetGlobalShaderTexture

void SetGlobalShaderTexture (string name, dir)

Set a global texture property.

Parameter
Type
Description

SetGlobalShaderFloat

void SetGlobalShaderFloat (string name, float dir)

Set a global float property for all shaders.

Parameter
Type
Description

SetGlobalShaderColor

void SetGlobalShaderColor (string name, dir)

Set a global color property for all shaders.

Parameter
Type
Description

SetGlobalShaderVector

void SetGlobalShaderVector (string name, dir)

Set a global color property for all shaders.

Parameter
Type
Description

Properties

DefaultReflectionResolution

int DefaultReflectionResolution get set

Cubemap resolution for default reflection.

Skybox

Skybox get set

The global skybox to use.

FlareFadeSpeed

float FlareFadeSpeed get set

The fade speed of all flares in the Scene.

FlareStrength

float FlareStrength get set

The intensity of all flares in the Scene.

HaloStrength

float HaloStrength get set

Size of the light halos.

ReflectionBounces

int ReflectionBounces get set

The number of times a reflection includes other reflections.

ReflectionIntensity

float ReflectionIntensity get set

How much the skybox / custom cubemap reflection affects the Scene.

SubtractiveShadowColor

SubtractiveShadowColor get set

The color used for the sun shadows in the Subtractive lightmode.

AmbientIntensity

float AmbientIntensity get set

How much the light from the Ambient Source affects the Scene.

AmbientLight

AmbientLight get set

Flat ambient lighting color.

AmbientGroundColor

AmbientGroundColor get set

Ambient lighting coming from below.

AmbientEquatorColor

AmbientEquatorColor get set

Ambient lighting coming from the sides.

AmbientSkyColor

AmbientSkyColor get set

Ambient lighting coming from above.

AmbientMode

int AmbientMode get set

Ambient lighting mode. Skybox = 1. Trilight = 2. Flat = 3. Custom = 4.

FogEndDistance

float FogEndDistance get set

The ending distance of linear fog.

FogStartDistance

float FogStartDistance get set

The starting distance of linear fog.

FogDensity

float FogDensity get set

The density of the exponential fog.

FogColor

FogColor get set

The color of the fog.

FogMode

int FogMode get set

Ambient lighting mode. Linear = 1. Exponential = 2. ExponentialSquared = 3.

Fog

bool Fog get set

Whether Fog is enabled

AmbientSkyboxAmount

float AmbientSkyboxAmount get set

How much the light from the Ambient Source affects the Scene.

DefaultReflectionMode

int DefaultReflectionMode get set

Ambient lighting mode. Skybox = 0. Custom = 1.

SColor get set

SColor get set

SColor get set

SAmbientMode get set

float get set

float get set

float get set

SColor get set

SFogMode get set

bool get set

float get set

SDefaultReflectionMode get set

void SetGlobalShaderTexture (string name, SResource dir)

void SetGlobalShaderFloat (string name, float dir)

void SetGlobalShaderColor (string name, SColor dir)

void SetGlobalShaderVector (string name, SVector dir)

int DefaultReflectionResolution get set

SMaterial Skybox get set

float FlareFadeSpeed get set

float FlareStrength get set

float HaloStrength get set

int ReflectionBounces get set

float ReflectionIntensity get set

SColor SubtractiveShadowColor get set

float AmbientIntensity get set

SResource
SColor
SVector
SMaterial
SColor
SColor
SColor
SColor
SColor
SColor

SColor get set

Space.RenderSettings.SetGlobalShaderTexture("_TestTex",Space.Resources[1])
Space.RenderSettings.SetGlobalShaderFloat("_Mult",1)
Space.RenderSettings.SetGlobalShaderFloat("_TestColor",Color.Red)
Space.RenderSettings.SetGlobalShaderFloat("_TestVector",Vector.One)
Space.RenderSettings.DefaultReflectionResolution=256
--the below script will make a slider change the Render Setting's Cube Map Resolution

thisGameObject = Space.Host.ExecutingObject

slider = Space.Host.GetReference("slider").UISlider --add reference to Scripting Runtime

OVC = function()
Space.RenderSettings.DefaultReflectionResolution = slider.Value * 4096 -- from 0 to 40906
end

slider.OnValueChanged(OVC)
Space.RenderSettings.Skybox=Space.Resources[1].AsMaterial
--clicking this object will toggle between two Skyboxes
--[Add 2 materials to the first two Resource slots in Scripting Runtime component]
thisGameObject = Space.Host.ExecutingObject

OnClick = function()
  if Space.RenderSettings.Skybox==Space.Resources[1].AsMaterial then
    Space.RenderSettings.Skybox=Space.Resources[2].AsMaterial
  else 
    Space.RenderSettings.Skybox=Space.Resources[1].AsMaterial
  end
end


thisGameObject.AddClickable()
thisGameObject.Clickable.OnClick(OnClick)
Space.RenderSettings.FlareFadeSpeed=5
--the below script will make a slider change the Render Setting's Flare Fade Speed

thisGameObject = Space.Host.ExecutingObject

slider = Space.Host.GetReference("slider").UISlider --add reference to Scripting Runtime

OVC = function()
Space.RenderSettings.FlareFadeSpeed = slider.Value * 5 -- from 0 to 5
end

slider.OnValueChanged(OVC)
Space.RenderSettings.FlareStrength=1
--the below script will make a slider change the Render Setting's Flare Strength

thisGameObject = Space.Host.ExecutingObject

slider = Space.Host.GetReference("slider").UISlider --add reference to Scripting Runtime

OVC = function()
Space.RenderSettings.FlareStrength = slider.Value * 5 -- from 0 to 5
end

slider.OnValueChanged(OVC)
Space.RenderSettings.HaloStrength=1
--the below script will make a slider change the Render Setting's Halo Strength

thisGameObject = Space.Host.ExecutingObject

slider = Space.Host.GetReference("slider").UISlider --add reference to Scripting Runtime

OVC = function()
Space.RenderSettings.HaloStrength = slider.Value * 5 -- from 0 to 5
end

slider.OnValueChanged(OVC)
Space.RenderSettings.ReflectionBounces=5
--the below script will make a slider change the Render Setting's Reflection Bounces

thisGameObject = Space.Host.ExecutingObject

slider = Space.Host.GetReference("slider").UISlider --add reference to Scripting Runtime

OVC = function()
Space.RenderSettings.ReflectionBounces = slider.Value * 5 -- from 0 to 5
end

slider.OnValueChanged(OVC)
Space.RenderSettings.ReflectionIntensity=1
--the below script will make a slider change the Render Setting's Reflection Intensity

thisGameObject = Space.Host.ExecutingObject

slider = Space.Host.GetReference("slider").UISlider --add reference to Scripting Runtime

OVC = function()
Space.RenderSettings.ReflectionIntensity = slider.Value * 5 -- from 0 to 5
end

slider.OnValueChanged(OVC)
Space.RenderSettings.SubtractiveShadowColor=Color.Red
--clicking the object will open a color picker that changes the Subtractive Shadow Color
thisGameObject = Space.Host.ExecutingObject
originalColor = Space.RenderSettings.SubtractiveShadowColor

OnChange = function(SColor) 
 Space.RenderSettings.SubtractiveShadowColor = SColor
end

OnSelect = function(SColor)
 Space.RenderSettings.SubtractiveShadowColor = SColor
end

OnCancel = function()
 Space.RenderSettings.SubtractiveShadowColor = originalColor
end

OnClick = function()
Space.Dialogues.ColorPicker("title","okbutton", OnChange, OnSelect, OnCancel, originalColor)
end


thisGameObject.AddClickable()
thisGameObject.Clickable.OnClick(OnClick)
Space.RenderSettings.AmbientIntensity = 1
--the below script will make a slider change the Render Setting's Ambient Intensity

thisGameObject = Space.Host.ExecutingObject

slider = Space.Host.GetReference("slider").UISlider --add reference to Scripting Runtime

OVC = function()
Space.RenderSettings.AmbientIntensity = slider.Value * 5 -- from 0 to 5
end

slider.OnValueChanged(OVC)
Space.RenderSettings.AmbientLight=Color.Blue
--clicking the object will open a color picker that changes the Ambient Light Color
thisGameObject = Space.Host.ExecutingObject
originalColor = Space.RenderSettings.AmbientLight

OnChange = function(SColor) 
 Space.RenderSettings.AmbientLight = SColor
end

OnSelect = function(SColor)
 Space.RenderSettings.AmbientLight = SColor
end

OnCancel = function()
 Space.RenderSettings.AmbientLight = originalColor
end

OnClick = function()
Space.Dialogues.ColorPicker("title","okbutton", OnChange, OnSelect, OnCancel, originalColor)
end


thisGameObject.AddClickable()
thisGameObject.Clickable.OnClick(OnClick)
Space.RenderSettings.AmbientGroundColor=Color.Green
--clicking the object will open a color picker that changes the Ambient Ground Color
thisGameObject = Space.Host.ExecutingObject
originalColor = Space.RenderSettings.AmbientGroundColor

OnChange = function(SColor) 
 Space.RenderSettings.AmbientGroundColor = SColor
end

OnSelect = function(SColor)
 Space.RenderSettings.AmbientGroundColor = SColor
end

OnCancel = function()
 Space.RenderSettings.AmbientGroundColor = originalColor
end

OnClick = function()
Space.Dialogues.ColorPicker("title","okbutton", OnChange, OnSelect, OnCancel, originalColor)
end


thisGameObject.AddClickable()
thisGameObject.Clickable.OnClick(OnClick)
Space.RenderSettings.AmbientEquatorColor=Color.Green
--clicking the object will open a color picker that changes the Ambient Equator Color
thisGameObject = Space.Host.ExecutingObject
originalColor = Space.RenderSettings.AmbientEquatorColor

OnChange = function(SColor) 
 Space.RenderSettings.AmbientEquatorColor = SColor
end

OnSelect = function(SColor)
 Space.RenderSettings.AmbientEquatorColor = SColor
end

OnCancel = function()
 Space.RenderSettings.AmbientEquatorColor= originalColor
end

OnClick = function()
Space.Dialogues.ColorPicker("title","okbutton", OnChange, OnSelect, OnCancel, originalColor)
end


thisGameObject.AddClickable()
thisGameObject.Clickable.OnClick(OnClick)
Space.RenderSettings.AmbientSkyColor=Color.White
--clicking the object will open a color picker that changes the Ambient Sky Color
thisGameObject = Space.Host.ExecutingObject
originalColor = Space.RenderSettings.AmbientSkyColor

OnChange = function(SColor) 
 Space.RenderSettings.AmbientSkyColor = SColor
end

OnSelect = function(SColor)
 Space.RenderSettings.AmbientSkyColor = SColor
end

OnCancel = function()
 Space.RenderSettings.AmbientSkyColor = originalColor
end

OnClick = function()
Space.Dialogues.ColorPicker("title","okbutton", OnChange, OnSelect, OnCancel, originalColor)
end


thisGameObject.AddClickable()
thisGameObject.Clickable.OnClick(OnClick)
Space.RenderSettings.AmbientMode=1
--clicking this object will toggle between 4 Ambient Modes

thisGameObject = Space.Host.ExecutingObject

OnClick = function()
  if Space.RenderSettings.AmbientMode==4 then
    Space.RenderSettings.AmbientMode=1
  else 
    Space.RenderSettings.AmbientMode = Space.RenderSettings.AmbientMode + 1
  end
end


thisGameObject.AddClickable()
thisGameObject.Clickable.OnClick(OnClick)
Space.RenderSettings.FogEndDistance=300
--the below script will make a slider change the Render Setting's Fog End Distance

thisGameObject = Space.Host.ExecutingObject

slider = Space.Host.GetReference("slider").UISlider --add reference to Scripting Runtime

OVC = function()
Space.RenderSettings.FogEndDistance = (slider.Value * 170) + 30-- from 30 to 200
end

slider.OnValueChanged(OVC)
Space.RenderSettings.FogStartDistance=10
--the below script will make a slider change the Render Setting's Fog Start Distance

thisGameObject = Space.Host.ExecutingObject

slider = Space.Host.GetReference("slider").UISlider --add reference to Scripting Runtime

OVC = function()
Space.RenderSettings.FogStartDistance = (slider.Value * 10) -- from 0 to 10
end

slider.OnValueChanged(OVC)
Space.RenderSettings.FogDensity=10
--the below script will make a slider change the Render Setting's Fog Density

thisGameObject = Space.Host.ExecutingObject

slider = Space.Host.GetReference("slider").UISlider --add reference to Scripting Runtime

OVC = function()
Space.RenderSettings.FogDensity = (slider.Value * 10) -- from 0 to 10
end

slider.OnValueChanged(OVC)
Space.RenderSettings.FogColor = Color.Red
--clicking the object will open a color picker that changes the Fog color
thisGameObject = Space.Host.ExecutingObject
originalColor = Space.RenderSettings.FogColor

OnChange = function(SColor) 
 Space.RenderSettings.FogColor = SColor
end

OnSelect = function(SColor)
 Space.RenderSettings.FogColor = SColor
end

OnCancel = function()
 Space.RenderSettings.FogColor = originalColor
end

OnClick = function()
Space.Dialogues.ColorPicker("title","okbutton", OnChange, OnSelect, OnCancel, originalColor)
end


thisGameObject.AddClickable()
thisGameObject.Clickable.OnClick(OnClick)
Space.RenderSettings.FogMode=2
--clicking this object will toggle between 3 Fog Modes

thisGameObject = Space.Host.ExecutingObject

OnClick = function()
  if Space.RenderSettings.FogMode==3 then
    Space.RenderSettings.FogMode=1
  else 
    Space.RenderSettings.FogMode = Space.RenderSettings.FogMode + 1
  end
end


thisGameObject.AddClickable()
thisGameObject.Clickable.OnClick(OnClick)
Space.RenderSettings.Fog=true
--clicking this object will toggle enable/disable Fog

thisGameObject = Space.Host.ExecutingObject

OnClick = function()
Space.RenderSettings.Fog = not Space.RenderSettings.Fog
end


thisGameObject.AddClickable()
thisGameObject.Clickable.OnClick(OnClick)
Space.RenderSettings.AmbientSkyboxAmount=10
--the below script will make a slider change the Render Setting's Ambient Skybox Amount

thisGameObject = Space.Host.ExecutingObject

slider = Space.Host.GetReference("slider").UISlider --add reference to Scripting Runtime

OVC = function()
Space.RenderSettings.AmbientSkyboxAmount = (slider.Value * 10) -- from 0 to 10
end

slider.OnValueChanged(OVC)
Space.RenderSettings.DefaultReflectionMode = 1
--clicking this object will toggle between two Default Reflection Modes

thisGameObject = Space.Host.ExecutingObject

OnClick = function()
  if Space.RenderSettings.DefaultReflectionMode==1 then
    Space.RenderSettings.DefaultReflectionMode=0
  else 
    Space.RenderSettings.DefaultReflectionMode=1
  end
end


thisGameObject.AddClickable()
thisGameObject.Clickable.OnClick(OnClick)
AmbientLight
AmbientGroundColor
AmbientEquatorColor
AmbientSkyColor
AmbientMode
FogEndDistance
FogStartDistance
FogDensity
FogColor
FogMode
Fog
AmbientSkyboxAmount
DefaultReflectionMode

SPersistence

Index

Functions Index

Function Name

Functions

UpdateInfo

void UpdateInfo (Closure onComplete)

Call the onComplete function upon the server saving a value.

Parameter
Type
Description

RetrieveValue

string RetrieveValue (string key)

Returns the saved value with the key.

Parameter
Type
Description

SetValue

void SetValue (string key, string value)

Save a value to the storage record that is accessed with key.

Parameter
Type
Description

UpdateRegionInfo

void UpdateRegionInfo (Action onComplete) void UpdateRegionInfo (Closure onComplete)

Updates your local cache with the most up-to-date values from the server. This function should be called before using the function.

Parameter
Type
Description

RetrieveRegionValue

string RetrieveRegionValue (string key)

Retrieves the saved value from "key" from your local cache. The function should be called first to update your local cache with the most up-to-date values from the server.

Parameter
Type
Description

SetRegionValue

void SetRegionValue (string key, string value)

Save the "value" to "key" on both your local cache and on the server.

Parameter
Type
Description

void UpdateInfo (Closure onComplete)

string RetrieveValue (string key)

void SetValue (string key, string value)

void UpdateRegionInfo (Action onComplete) void UpdateRegionInfo (Closure onComplete)

string RetrieveRegionValue (string key)

void SetRegionValue (string key, string value)

key

string

Max length 48

value

string

Max length 255

key

string

Max length 48

value

string

Max length 255

RetrieveRegionValue
UpdateRegionInfo
function OnCompleteFunction()
--
end

Space.Persistence.UpdateInfo(OnCompleteFunction)
Space.Persistence.SetValue("TestValue","123");

Space.Persistence.UpdateInfo(function ()
    local value = Space.Persistence.RetrieveValue("TestValue")
    Space.Log(value)
end)
--print "123" to console.
Space.Persistence.RetrieveValue("TestValue")
Space.Persistence.SetValue("MyValue", "Hello World");
Space.Persistence.SetRegionValue("TestRegionValue","456")

Space.Persistence.UpdateRegionInfo(function ()
    local value = Space.Persistence.RetrieveRegionValue("TestRegionValue")
    Space.Log(value)
end)
--print "456" to console.
Space.Persistence.RetrieveRegionValue("TestRegionValue");
Space.Persistence.SetRegionValue("TestRegionValue","456");

SCameraManager

Index

Functions Index

Function Name

Properties Index

Property

Properties

IsLocked

bool IsLocked get

Is the Camera locked?

MainCamera

MainCamera get

Note, this property is generally read-only. It's position is driven by internal code.

ActiveVirtualCamera

ActiveVirtualCamera get

The currently active Cinemachine Virtual Camera game object.

Functions

LockCamera

void LockCamera ()

Calling this function stops the Camera from being controlled by the viewer, and allows us to control it until is called.

ReleaseCamera

void ReleaseCamera ()

Calling this function reverses the call and returns control of the Camera to the viewer.

SetCameraPositionOrientation

void SetCameraPositionOrientation ( position, orientation)

Sets the Camera's position and rotation. This function requires

Parameter
Type
Description

ScreenCoordinatesToRay

ScreenCoordinatesToRay ( screenCoordinates)

Returns a ray going from camera through a screen point.

Parameter
Type
Description

ScreenCoordinatesToWorld

ScreenCoordinatesToWorld (screenCoordinates)

Transforms a point from screen space into world space.

Parameter
Type
Description

WorldCoordinatesToScreen

WorldCoordinatesToScreen ( coordinates)

Function Description

Parameter
Type
Description

ShakeCamera

void ShakeCamera (float magnitude, float time) void ShakeCamera (float amplitude, float frequency, float time)

Function Description

Parameter
Type
Description

void LockCamera (SGameObject owner)

void ReleaseCamera ()

void SetCameraPositionOrientation (SVector position, SQuaternion orientation)

SRay ScreenCoordinatesToRay (SVector screenCoordinates)

SVector ScreenCoordinatesToWorld (SVector screenCoordinates)

SVector WorldCoordinatesToScreen (SVector coordinates)

void ShakeCamera (float magnitude, float time) void ShakeCamera (float amplitude, float frequency, float time)

bool IsLocked get

SGameObject MainCamera get

SGameObject ActiveVirtualCamera get

position

SVector

The World Postion of the camera GameObject.

orientation

SQuaternion

The World Rotation of the camera GameObject.

SGameObject
SGameObject
ReleaseCamera()
LockCamera()
SVector
SQuaternion
the camera to be locked.
SRay
SVector
SVector
SVector
SVector
SVector
isCameraLocked = Space.Camera.IsLocked
mainCamera = Space.Camera.MainCamera
currentCamera = Space.Camera.ActiveVirtualCamera
Space.Camera.LockCamera()
Space.Camera.ReleaseCamera()
Space.Camera.SetCameraPositionOrientation (Vector.New(0,0,0),Quaternion.Euler(-60,0,0));
cameraRay = Space.Camera.ScreenCoordinatesToRay (Vector.New(0,50,0))
 --this script will make this object jump to wherever you right click
--(Example: moving objects with right click )

thisGameObject = Space.Host.ExecutingObject


OnUpdate = function()
  if Space.Input.GetMouseDown(1) then
   clickRay = Space.Camera.ScreenCoordinatesToRay(Space.Input.MousePosition)
  rayCastHit = Space.Physics.RayCastSingle(clickRay.Origin, clickRay.Direction, 50.0)
  thisGameObject.WorldPosition = rayCastHit.Position
  end
end

thisGameObject.SubscribeToEvents()
thisGameObject.OnUpdate(OnUpdate) 
obj = Space.Host.ExecutingObject;
Space.Log(Space.Camera.ScreenCoordinatesToWorld(Vector.New(0.5,0.5,0)).ToString());

-- Print 3 worldspace vectors created by screen space point to the console.
local trans = Space.Host.ExecutingObject;
Space.Log(Space.Camera.WorldCoordinatesToScreen(trans.WorldPosition).ToString());

-- Print the position created by world space point to the console.
Space.Camera.ShakeCamera(1, 1.0)
--or
Space.Camera.ShakeCamera(2, 1, 1.0)

SHost

Index

Functions Index

Function Name

Properties Index

Property Name

Functions

InvokeEvent

void InvokeEvent (string name)

Invokes a UnityEvent attached to the Scripting Runtime component this script is executing in.

Parameter
Type
Description

Stop

void Stop ()

Pauses the current script until it is manually restarted, at the end of the current function/method; consider using return as well.

InvokeDelayed

void InvokeDelayed (Closure c, float delay)

Invoke the closure after the delayed time.

Parameter
Type
Description

StartCoroutine

void StartCoroutine (DynValue value, DynValue parameter=default(DynValue), string name=null) void StartCoroutine (string value, DynValue parameter=default(DynValue), string name=null)

Executes the specified function as a coroutine.

Parameter
Type
Description

ReferenceExists

bool ReferenceExists (string name)

Return true when the reference object exists and is not empty.

Parameter
Type
Description

ReferenceExistsAndNotEmpty

bool ReferenceExistsAndNotEmpty (string name)

Return true when the reference object exists and is not empty.

Parameter
Type
Description

GetReference

GetReference (string name)

Pulls a reference from the scripting runtime component's "References" section by it's name.

Parameter
Type
Description

Evaluate

void Evaluate (string script)

Executes given Lua code/script. (white-label only)

Parameter
Type
Description

Properties

ExecutingObject

ExecutingObject get

A reference to the GameObject that is executing this script. (The GameObject that this Scripting Runtime component is attached to).

Language

string Language get

Returns the English name for the users language, e.g. 'English', 'French', 'Chinese'

SPhysics

Index

Functions Index

Function Name

void InvokeEvent (string name)

void Stop ()

void InvokeDelayed (Closure c, float delay)

void StartCoroutine (DynValue value, DynValue parameter=default(DynValue), string name=null) void StartCoroutine (string value, DynValue parameter=default(DynValue)

bool ReferenceExists (string name)

bool ReferenceExistsAndNotEmpty (string name)

SGameObject GetReference (string name)

void Evaluate (string script)

SGameObject ExecutingObject get

string Language get

name

string

The name of the reference as set within the Scripting Runtime component (references section).

SGameObject
SGameObject
Space.Host.InvokeEvent("EventName")
Space.Host.Stop()
local trans=Space.Host.ExecutingObject;
trans.SubscribeToEvents();

function Running()
    Space.Log("Running")
end

trans.OnUpdate(Running)

Space.Host.InvokeDelayed(function()
    Space.Log("Stop")
    Space.Host.Stop()
end,5)

--After print the "Stop","Running" won't display anymore.
Space.Host.InvokeDelayed(AFunction, 10)
--Clicking this object makes it destroy itself after 5 seconds
thisObject = Space.Host.ExecutingObject


function DeleteFunction()
  thisObject.Destroy()
end


function OnClickFunction()
  Space.Host.InvokeDelayed(DeleteFunction,10)
end


thisObject.AddClickable()
thisObject.Clickable.OnClick(OnClickFunction)
Space.Host.StartCoroutine(aFunction)
--or
Space.Host.StartCoroutine("aFunctionName")
local function myCoroutine()
    -- The yield statement is a special kind of return, that ensures that the function will continue from the line once the coroutine resumes.
    -- Placing a float value inside of the yield will result in a delayed execution.
    -- Example: coroutine.yield(0.5) will wait 0.5 seconds before continuing the execution of the coroutine.

    -- This will print the current players active time.
    Space.Log(Space.Time);

    -- Execution of this coroutine will be halted for 10 seconds.
    coroutine.yield(10);

    -- This will print the current players active time, which will be 10 seconds greater then the previous as a result of the yield
    Space.Log(Space.Time);
end

Space.Host.StartCoroutine(myCoroutine);
referenceExists = Space.Host.ReferenceExists("the reference name")
existsNotEmpty = Space.Host.ReferenceExistsAndNotEmpty("obj")
--Print "false" to console if didn't set the object named "obj" to the Object References or attach the reference to "obj".
theObject = Space.Host.GetReference("referenceName")
--Clicking this object makes it destroy the object we linked in the references section
thisObject = Space.Host.ExecutingObject
dObject = Space.Host.GetReference("theObjectToBeDestroyed")

function OnClickFunction()
 dObject.Destroy()
end

thisObject.AddClickable()
thisObject.Clickable.OnClick(OnClickFunction)
Space.Host.Evaluate('Space.Log("test")')
object = Space.Host.ExecutingObject
lang = Space.Host.Language
--Makes a UIText show a different message according to the client's language
TextObject = Space.Host.GetReference("TextObject") --add to references section of Scripting Runtime component

language = Space.Host.Language


if language == "English" then
  TextObject.UIText.Text = "Welcome!"
elseif language == "Dutch" then
  TextObject.UIText.Text = "welkom!"
elseif language == "French" then
  TextObject.UIText.Text = "bienvenue!"
else
  TextObject.UIText.Text = "Welcome!"
end

SPhysicsHit[] (SVector origin, SVector normal, float distance, SLayerMask layerMask=null)

SPhysicsHit (SVector origin, SVector normal, float distance, SLayerMask layerMask=null)

SPhysicsHit[] (SVector origin, float radius, float distance, SVector direction, SLayerMask layerMask=null) SPhysicsHit[] (SVector origin, float radius, float distance, SLayerMask layerMask=null)

SPhysicsHit[] (SVector origin, SVector end, float radius, float distance, SVector up, SLayerMask layerMask=null) SPhysicsHit[] (SVector origin, SVector end, float radius, float distance, SLayerMask layerMask=null)

SPhysicsHit[] (SVector origin, SVector extents, SVector direction, SQuaternion orientation, float distance, SLayerMask layerMask=null)

Properties Index

Property Name

SVector get set

Functions

RayCast

SPhysicsHit[] RayCast (SVector origin, SVector normal, float distance, SLayerMask layerMask=null)

Raycasts from origin along normal, distance meters - and returns a list of collisions in distance order (closest first)

Parameter
Type
Description

origin

SVector

normal

SVector

distance

SVector

RayCastSingle

SPhysicsHit RayCastSingle (SVector origin, SVector normal, float distance, SLayerMask layerMask=null)

Raycasts from origin along normal, distance meters - and returns the first collision.

Parameter
Type
Description

SphereCast

SPhysicsHit[] SphereCast (SVector origin, float radius, float distance, SVector direction, SLayerMask layerMask=null) SPhysicsHit[] SphereCast (SVector origin, float radius, float distance, SLayerMask layerMask=null)

Sweeps from origin in a spherical ray 'radius' wide, and returns the list of collided objects

Parameter
Type
Description

CapsuleCast

SPhysicsHit[] CapsuleCast (SVector origin, SVector end, float radius, float distance, SVector up, SLayerMask layerMask=null) SPhysicsHit[] CapsuleCast (SVector origin, SVector end, float radius, float distance, SLayerMask layerMask=null)

Sweeps a capsule from origin to end, radius wide and returns a list of collisions.

Parameter
Type
Description

BoxCast

SPhysicsHit[] BoxCast (SVector origin, SVector extents, SVector direction, SQuaternion orientation, float distance, SLayerMask layerMask=null)

Sweeps a box defined by origin+halfExtents along direction, distance meters with a orientation matching orientation - and returns a list of collisions in distance order.

Parameter
Type
Description

Properties

Gravity

SVector Gravity get set

The gravity applied to all rigid bodies in the Scene.

Gravity can be turned off for an individual Rigidbody using its UseGravity property.

SPostFX

Index

Functions Index

Function Name

Functions

CreateCommandBuffer

CreateCommandBuffer ()

Return a new CommandBuffer.

AddCommandBufferToCamera

void AddCommandBufferToCamera ( commandbuffer, int cameraEvent=19)

Add the CommandBuffer to the Main Camera.

Parameter
Type
Description

RemoveCommandBufferFromCamera

void RemoveCommandBufferFromCamera ( commandbuffer, int cameraEvent=19)

Remove the CommandBuffer from the Main Camera.

Parameter
Type
Description

SetPostProfile

void SetPostProfile ( customProfile)

Set a custom Space Post-Processing Profile.

Parameter
Type
Description

ClearPostProfile

void ClearPostProfile ()

Clear current Post-Processing profile and restore default one.

SetCrepsecularRays

void SetCrepsecularRays (bool on, float thresR, float thresG, float thresB, float colorR, float colorG, float colorB, float falloff, float blurSize, int blurIterations, float intensity)

Function Description

Parameter
Type
Description

SetAmbientOcclusion

void SetAmbientOcclusion (bool on, float intensity, bool aoOnly)

Function Description

Parameter
Type
Description

SetMotionBlur

void SetMotionBlur (bool on, float shutterAngle)

Function Description

Parameter
Type
Description

SetBloom

void SetBloom (bool on, float threshold, float intensity)

Function Description

Parameter
Type
Description

SetAnamorphicFlares

void SetAnamorphicFlares (bool on, float r, float g, float b, float intensity, float threshold, float spread, bool vertical)

Function Description

Parameter
Type
Description

SetVignette

void SetVignette (bool on, float r, float g, float b, float intensity)

Function Description

Parameter
Type
Description

SetLensDirt

void SetLensDirt (bool on, float threshold, SResource texture, float intensity)

Function Description

Parameter
Type
Description

SetChromaticAberrationPost

void SetChromaticAberrationPost (bool on, float strength, float cornerBlur)

Function Description

Parameter
Type
Description

SetFocus

void SetFocus ( target)

Function Description

Parameter
Type
Description

SupressFocus

void SupressFocus ()

Function Description

RestoreFocus

void RestoreFocus ()

Function Description

SetLookUpTable

void SetLookUpTable ( lut)

Function Description

Parameter
Type
Description
tableSPhysicsHit = Space.Physics.RayCast(Vector.New(0,0,0), Vector.New(1,0,0), 2.0)
local trans=Space.Host.ExecutingObject
function Raycast()
    local rays = Space.Physics.RayCast(trans.WorldPosition,trans.Forward,50)
    if(rays~=nil and #rays>0) then
for i=0,#rays - 1 do
    Space.Log(rays[i].Object.Name.." i = "..i)
end
    end
end
trans.OnUpdate(Raycast)
SPhysicsHit = Space.Physics.RayCastSingle(Vector.New(0,0,0), Vector.New(1,0,0), 2.0)
local trans=Space.Host.ExecutingObject
function RaycastSingle()
    local ray=Space.Physics.RayCastSingle(trans.WorldPosition,trans.Forward,50)
    if(ray~=nil and ray.ContainsHit==true) then
Space.Log(ray.Object.Name)     end
end
trans.OnUpdate(RaycastSingle)
 --this script will make this object jump to wherever you right click
--(Example: moving objects with right click )

thisGameObject = Space.Host.ExecutingObject


OnUpdate = function()
  if Space.Input.GetMouseDown(1) then
   clickRay = Space.Camera.ScreenCoordinatesToRay(Space.Input.MousePosition)
  rayCastHit = Space.Physics.RayCastSingle(clickRay.Origin, clickRay.Direction, 50.0)
  thisGameObject.WorldPosition = rayCastHit.Position
  end
end

thisGameObject.SubscribeToEvents()
thisGameObject.OnUpdate(OnUpdate)  
tableSPhysicsHit = Space.Physics.SphereCast(Vector.New(0,0,0), 3.0, 2.0, Vector.New(1,0,0))
--or
tableSPhysicsHit = Space.Physics.SphereCast(Vector.New(0,0,0), 3.0, 2.0)
local trans=Space.Host.ExecutingObject
function SphereRaycast()
    local center=trans.WorldPosition + Vector.New(0.5,0.5,0.5)
    local rays=Space.Physics.SphereCast(center,10,10,trans.Forward)
    if rays~=nil and #rays>0 then
for i=0,#rays - 1 do
    Space.Log(rays[i].Object.Name.." i = "..i)
end
    end
end
trans.OnUpdate(SphereRaycast)
tableSPhysicsHit = Space.Physics.CapsuleCast(Vector.New(0,0,0),Vector.New(0,5,0), 3.0, 2.0, Vector.New(1,0,0))
--or
tableSPhysicsHit = Space.Physics.CapsuleCast(Vector.New(0,0,0),Vector.New(0,5,0), 3.0, 2.0)
local trans=Space.Host.ExecutingObject
function CapsuleCast()
    local startp=trans.WorldPosition
    local endp=startp+trans.Up*10
    local rays=Space.Physics.CapsuleCast(startp,endp,1,10,trans.Up)
    if rays~=nil and #rays>0 then
for i=0,#rays - 1 do
    Space.Log(rays[i].Object.Name.." i = "..i)
end
    end
end
trans.OnUpdate(CapsuleCast)
tableSPhysicsHit = Space.Physics.BoxCast(Vector.New(0,0,0),Vector.New(1,1,1), Vector.New(0,1,0), Quaternion.New(0,60,0), 10.0)
local trans=Space.Host.ExecutingObject
function BoxCast()
    local center=trans.WorldPosition + Vector.New(0.5,0.5,0.5)
    local endp=local extents=Vector.new(2,2,2)
    local rays=Space.Physics.BoxCast(center,extents,trans.Forward,Quaternion.Identity,2)
    if rays~=nil and #rays>0 then
for i=0,#rays - 1 do
    Space.Log(rays[i].Object.Name.." i = "..i)
end
    end
end
trans.OnUpdate(BoxCast)
Space.Physics.Gravity = Vector.New(0,-1.0,0)

layerMask

SLayerMask

Include a layer mask if you do not want to use viewer's defaults.

RayCast
RayCastSingle
SphereCast
SphereCast
CapsuleCast
CapsuleCast
BoxCast
Gravity

void (bool on, float strength, float cornerBlur)

void (SGameObject target)

void ()

void ()

void (SResource lut)

SCommandBuffer CreateCommandBuffer ()

void AddCommandBufferToCamera (SCommandBuffer commandbuffer, int cameraEvent=19)

void RemoveCommandBufferFromCamera (SCommandBuffer commandbuffer, int cameraEvent=19)

void SetPostProfile (SResource customProfile)

void ClearPostProfile ()

void SetCrepsecularRays (bool on, float thresR, float thresG, float thresB, float colorR, float colorG, float colorB, float falloff, float blurSize, int blurIterations, float intensity)

void SetAmbientOcclusion (bool on, float intensity, bool aoOnly)

void SetMotionBlur (bool on, float shutterAngle)

void SetBloom (bool on, float threshold, float intensity)

void SetAnamorphicFlares (bool on, float r, float g, float b, float intensity, float threshold, float spread, bool vertical)

void SetVignette (bool on, float r, float g, float b, float intensity)

SCommandBuffer
SCommandBuffer
SCommandBuffer
SResource
SGameObject
SResource

void (bool on, float threshold, SResource texture, float intensity)

commandBuffer = Space.PostFX.CreateCommandBuffer()
local commandbuffer=Space.PostFX.CreateCommandBuffer()
local mat=Space.Resources[1]
local cube=Space.Host.GetReference("Cube")
commandbuffer.DrawRenderer(cube.Renderer,mat.AsMaterial)
Space.PostFX.AddCommandBufferToCamera(commandbuffer)
Space.PostFX.AddCommandBufferToCamera(ACommandBuffer)
---or
Space.PostFX.AddCommandBufferToCamera(ACommandBuffer, 18)
local commandbuffer=Space.PostFX.CreateCommandBuffer()
local mat=Space.Resources[1]
local cube=Space.Host.GetReference("Cube")
commandbuffer.DrawRenderer(cube.Renderer,mat.AsMaterial)
Space.PostFX.AddCommandBufferToCamera(commandbuffer)
function RemoveCommandBuffer()
--Bind this function to a button and then click it in playing.
    Space.PostFX.RemoveCommandBufferFromCamera(commandbuffer)
end
Space.PostFX.RemoveCommandBufferToCamera(ACommandBuffer)
---or
Space.PostFX.RemoveCommandBufferToCamera(ACommandBuffer, 18)
local commandbuffer=Space.PostFX.CreateCommandBuffer()
local mat=Space.Resources[1]
local cube=Space.Host.GetReference("Cube")
commandbuffer.DrawRenderer(cube.Renderer,mat.AsMaterial)
Space.PostFX.AddCommandBufferToCamera(commandbuffer)
function RemoveCommandBuffer()
--Bind this function to a button and then click it in playing.
    Space.PostFX.RemoveCommandBufferFromCamera(commandbuffer)
end
Space.PostFX.SetPostProfile(Space.Resources[1])
Space.PostFX.ClearPostProfile()
Space.PostFX.SetCrepsecularRays(true, 255.0, 0.0, 0.0, 0.0,0.0, 255.0, 1.0, 1.0, 2, 4.0)
Space.PostFX.SetAmbientOcclusion(true, 4.0, true)
Space.PostFX.SetMotionBlur(true, 20.0)
Space.PostFX.SetBloom(true, 2.0, 4.0)
Space.PostFX.SetBloom(true, 255.0, 0.0, 0.0, 4.0, 2.0, 3.0, true)
Space.PostFX.SetVignette(true, 255.0, 0.0, 0.0, 4.0)
Space.PostFX.SetLensDirt(true, 4.0, Space.Resources[1], 4.0)
Space.PostFX.SetChromaticAberrationPost(true, 4.0, 1.0)
Space.PostFX.SetFocus(Space.Host.ExecutingObject)
Space.PostFX.SupressFocus()
Space.PostFX.RestoreFocus()
Space.PostFX.SetLookUpTable(Space.Resources[1])
SetLensDirt
SetChromaticAberrationPost
SetFocus
SupressFocus
RestoreFocus
SetLookUpTable

SGrid

Index

Functions Index

Function Name

Properties Index

Property Name

Functions

GetEnabledUserRegions

void GetEnabledUserRegions (Closure onComplete)

Calling this function will asynchronously get and return information about this player's regions as (This is the same information in the "Region List" window).

Parameter
Type
Description

GetRegionTexture

void GetRegionTexture (region, Closure onComplete) void GetRegionTexture (string json, Closure onComplete)

Returns the Region Texture (the image seen while loading the region) as a resource. This function requires an object to identify which region. (white-label grids only)

Parameter
Type
Description

GetOutfits

void GetOutfits (Closure onComplete)

Calling this function will asynchronously get and return information about this player's outfits as a List of .

Parameter
Type
Description

Properties

IsWhiteLabel

bool IsWhiteLabel get

Returns true if this Grid is a white-label Grid.

PlayerIsAdmin

bool PlayerIsAdmin get

Returns true if this player's Grid role is Admin.(white-label grid only)

PlayerIsModerator

bool PlayerIsModerator get

Returns true if this player's Grid role is Moderator. (white-label grid only)

PlayerIsDeveloper

bool PlayerIsDeveloper get

Returns true if this player's Grid role is Developer.(white-label grid only)

PlayerIsTrusted

bool PlayerIsTrusted get

Returns true if this player's Grid role is Trusted.(white-label grid only)

ThemeColor1

ThemeColor1 get

The viewer's Theme Color 1.

The viewer's theme consist of 4 Theme Colors and 2 Text Colors.

ThemeColor2

ThemeColor2 get

The viewer's Theme Color 2.

The viewer's theme consist of 4 Theme Colors and 2 Text Colors.

ThemeColor3

ThemeColor3 get

The viewer's Theme Color 3.

The viewer's theme consist of 4 Theme Colors and 2 Text Colors.

ThemeColor4

ThemeColor4 get

The viewer's Theme Color 4.

The viewer's theme consist of 4 Theme Colors and 2 Text Colors.

TextColor1

TextColor1 get

The viewer's Text Color 1.

The viewer's theme consist of 4 Theme Colors and 2 Text Colors.

TextColor2

TextColor2 get

The viewer's Text Color 2.

The viewer's theme consist of 4 Theme Colors and 2 Text Colors.

Name

string Name get

Returns the Grid's Name. (white-label grid only)

SiteURL

string SiteURL get

Returns the Grid's Site URL. (white-label grid only)

DefaultRegion

int DefaultRegion get

Returns the Region ID of the Default Region. The Default Region is set in the grid's Dashboard. (white-label grid only)

Avatars

int[] Avatars get

Returns the IDs of all Avatars in the grid. (white-label grid only)

OrientationRegion

int OrientationRegion get

Returns the Region ID of the "Orientation Region".

SColor get

string get

string get

int get

int[] get

int get

void GetEnabledUserRegions (Closure onComplete)

void GetRegionTexture (SPublicRegion region, Closure onComplete) void GetRegionTexture (string json, Closure onComplete)

void GetOutfits (Closure onComplete)

bool IsWhiteLabel get

bool PlayerIsAdmin get

bool PlayerIsModerator get

bool PlayerIsDeveloper get

bool PlayerIsTrusted get

SColor ThemeColor1 get

SColor ThemeColor2 get

SColor ThemeColor3 get

SColor ThemeColor4 get

onComplete

Closure (Callback)

onComplete is a function that will be called on completion with SUserRegions as a parameter. onComplete(SUserRegions)

onComplete

Closure (Callback)

onComplete is a function that will be called on completion with a List of SOutfit as a parameter.

SUserRegions.
SPublicRegion
SPublicRegion
SOutfit
SColor
SColor
SColor
SColor
SColor
SColor

SColor get

function GetUserRegionsComplete(SUserRegions)
--
end
Space.Grid.GetEnabledUserRegions(GetUserRegionsComplete)
--Make's a UIText show this Grid's current Subscription Tier

textObject = Space.Host.GetReference("TheTextReference") --add to References section in Scripting Runtime

function GetUserRegionsComplete(SUserRegions)
  local r = SUserRegions.SubscriptionTier
  text.UIText.Text = r
end

Space.Grid.GetEnabledUserRegions(GetUserRegionsComplete)
Space.Grid.GetRegionTexture(AnSPublicRegionObject,OnCompleteFunction)
--see below example
--When this object is clicked, it's material becomes the Region Texture of the user's first region

thisObject = Space.Host.ExecutingObject

function GetTextureComplete(textureResource)
  thisObject.Renderer.Material.SetTexture("_MainTex",textureResource)
end

function GetUserRegionsComplete(SUserRegions)
  r = SUserRegions.AvailableRegions
  Space.Grid.GetRegionTexture(r[1],GetTextureComplete)
end

function OnClickFunction()
Space.Grid.GetEnabledUserRegions(GetUserRegionsComplete)
end

thisObject.AddClickable()
thisObject.Clickable.OnClick(OnClickFunction)
function OnGetOutfitsComplete(TableSOutfits)
--
end
Space.Grid.GetOutfits(OnGetOutfitsComplete)
isWhiteLabel = Space.Grid.IsWhiteLabel
--Clicking this object will turn it green color if this grid is white-label
--and will turn it red color if not

thisObject = Space.Host.ExecutingObject

function OnClickFunction()

  if Space.Grid.IsWhiteLabel then
    thisObject.Renderer.Material.SetColor("_Color",Color.Green)
  else
    thisObject.Renderer.Material.SetColor("_Color",Color.Red)
  end
end


thisObject.AddClickable()
thisObject.Clickable.OnClick(OnClickFunction)
isAdmin = Space.Grid.PlayerIsAdmin
--Clicking this object will turn it green color if your grid role is Admin
--and will turn it red color if not

thisObject = Space.Host.ExecutingObject

function OnClickFunction()

  if Space.Grid.PlayerIsAdmin then
    thisObject.Renderer.Material.SetColor("_Color",Color.Green)
  else
    thisObject.Renderer.Material.SetColor("_Color",Color.Red)
  end
end


thisObject.AddClickable()
thisObject.Clickable.OnClick(OnClickFunction)
isModerator = Space.Grid.PlayerIsModerator
--Clicking this object will turn it green color if your grid role is Moderator
--and will turn it red color if not

thisObject = Space.Host.ExecutingObject

function OnClickFunction()

  if Space.Grid.PlayerIsModerator then
    thisObject.Renderer.Material.SetColor("_Color",Color.Green)
  else
    thisObject.Renderer.Material.SetColor("_Color",Color.Red)
  end
end


thisObject.AddClickable()
thisObject.Clickable.OnClick(OnClickFunction)
isDeveloper = Space.Grid.PlayerIsDeveloper
--Clicking this object will turn it green color if your grid role is Developer
--and will turn it red color if not

thisObject = Space.Host.ExecutingObject

function OnClickFunction()

  if Space.Grid.PlayerIsDeveloper then
    thisObject.Renderer.Material.SetColor("_Color",Color.Green)
  else
    thisObject.Renderer.Material.SetColor("_Color",Color.Red)
  end
end


thisObject.AddClickable()
thisObject.Clickable.OnClick(OnClickFunction)
isTrusted = Space.Grid.PlayerIsTrusted
--Clicking this object will turn it green color if your grid role is Trusted
--and will turn it red color if not

thisObject = Space.Host.ExecutingObject

function OnClickFunction()

  if Space.Grid.PlayerIsTrusted then
    thisObject.Renderer.Material.SetColor("_Color",Color.Green)
  else
    thisObject.Renderer.Material.SetColor("_Color",Color.Red)
  end
end


thisObject.AddClickable()
thisObject.Clickable.OnClick(OnClickFunction)
themeColor1 = Space.Grid.ThemeColor1
themeColor2 = Space.Grid.ThemeColor2
themeColor3 = Space.Grid.ThemeColor3
themeColor4 = Space.Grid.ThemeColor4
textColor1 = Space.Grid.TextColor1
textColor2 = Space.Grid.TextColor2
gridName = Space.Grid.Name
--Clicking this object will populate a UIText field with the current Grid's Name
thisObject = Space.Host.ExecutingObject
textObject = Space.Host.GetReference("TheTextReference")


function OnClickFunction()
local gridName = Space.Grid.Name
textObject.UIText.Text = gridName
end

thisObject.AddClickable()
thisObject.Clickable.OnClick(OnClickFunction
siteUrl = Space.Grid.SiteURL
--Clicking this object will populate a UIText field with the current Grid's Site URL
thisObject = Space.Host.ExecutingObject
textObject = Space.Host.GetReference("TheTextReference")


function OnClickFunction()
local siteURL = Space.Grid.SiteURL
textObject.UIText.Text = siteURL
end

thisObject.AddClickable()
thisObject.Clickable.OnClick(OnClickFunction
defaultRegion = Space.Grid.DefaultRegion
--Clicking this object will teleport the user to the grid's Default Region
thisObject = Space.Host.ExecutingObject


function OnClickFunction()
  local defaultRegion = Space.Grid.DefaultRegion
  Space.PlayerAvatar.Teleport(defaultRegion)
end


thisObject.AddClickable()
thisObject.Clickable.OnClick(OnClickFunction)
avatars = Space.Grid.Avatars
--Clicking this object will populate a UIText field with the current Grid's Avatars
thisObject = Space.Host.ExecutingObject
textObject = Space.Host.GetReference("TheTextReference")


function OnClickFunction()
  local avatars = Space.Grid.Avatars
  av = json.serialize(avatars)
  textObject.UIText.Text = av
end

thisObject.AddClickable()
thisObject.Clickable.OnClick(OnClickFunction)
 orientationRegion = Space.Grid.OrientationRegion
--Clicking this object will teleport the user to the grid's Orientation Region
thisObject = Space.Host.ExecutingObject


function OnClickFunction()
  local orientationRegionRegion = Space.Grid.OrientationRegion
  Space.PlayerAvatar.Teleport(orientationRegion)
end


thisObject.AddClickable()
thisObject.Clickable.OnClick(OnClickFunction)
TextColor1
TextColor2
Name
SiteURL
DefaultRegion
Avatars
OrientationRegion

SScript

Functions

TypeName

string TypeName (DynValue dv)

Return the type name of the value.

Parameter
Type
Description

TrackingAllowed

bool TrackingAllowed (string key)

Returns true on white-label grids when the user has opted into tracking for the given key. Always returns false on the main grid.

Parameter
Type
Description

TrackingRequest

void TrackingRequest (string key, string privacynotice, Closure callback, bool force=false)

Displays a consent prompt (EULA-style) asking the user to allow tracking for a given key. On white-label grids, stores the user's choice and invokes the callback with a boolean indicating consent. On the main grid, this does nothing.

Parameter
Type
Description

GetResource

GetResource (string name)

Returns a reference to a SResource using it's Resource name.

Parameter
Type
Description

LogEvent

void LogEvent (string eventName, float value, position)

Logs an analytics event to the server on white-label grids.

Parameter
Type
Description

Log

void Log (DynValue text, bool logToFile=false) void Log (string text, bool logToFile=false)

Log a message to console.

Parameter
Type
Description

Properties

Inventory

Inventory get

Allows access to the users inventory

Persistence

Persistence get

Stores information between user sessions, and for other users

Scene

Scene get

Allows access to the current scene graph (objects and avatars in the scene, and other information)

Grid

Grid get

Property Description

Host

Host get

Access information about the current scripting runtime host

Physics

Physics get

Call physics-related commands, and variables, such as raycasting

Math

Math get

Math related functions (Sin, Cos, Tan, etc)

String

String get

Miscellaneous additional string functions (e.g. MD5Sum)

Input

Input get

Input device related functions (mouse position, keyboard state)

Camera

Camera get

Take and control the users camera

WebServices

WebServices get

Call remote web services to designated hosts (will not work with arbitrary domains, see page for details)

Network

Network get

Send data to other clients through the region server

PostFX

PostFX get

Property Description

AudioAnalyser

SAudioAnalyser AudioAnalyser get

Property Description

Tween

STween Tween get

Property Description

UI

UI get

Property Description

Dialogues

Dialogues get

Property Description

Shared

Shared get

Property Description

Quests

Quests get

Property Description

Economy

Economy get

Property Description

Groups

Groups get

Property Description

Activity

SActivity Activity get

Property Description

RenderSettings

RenderSettings get

Property Description

Profile

Profile get

Property Description

Photos

Photos get

Property Description

Videos

Videos get

Property Description

MusicDirectory

SMusicDirectory MusicDirectory get

Property Description

Journey

SJourney Journey get

Property Description

GameTester

SGameTester GameTester get

Property Description

RuntimeType

string RuntimeType get

Return current RuntimeType name.

Platform

string Platform get

Return current platform name.

SessionID

string SessionID get

Return current SessionID.

InEditor

bool InEditor get

Return true if in unity editor.

Version

int Version get

Returns the numeric build version of the viewer (for programmatic comparisons). In the Unity Editor this returns int.MaxValue; if unknown at runtime it returns -1.

FullVersionString

string FullVersionString get

Returns the full build version display string tied to release notes (e.g., "2025.6f210"). Best for user-facing display and logging.

Resources

[] Resources get

Property Description

Time

float Time get

Returns time at the beginning of this frame.

ServerTime

string ServerTime get

Returns current server time.

LocalTime

string LocalTime get

Returns current local time.

LoginTime

float LoginTime get

Returns how long player has been logged in (in seconds).

ServerTimeUnix

int ServerTimeUnix get

Returns the server time unix timestamp.

LocalTimeUnix

int LocalTimeUnix get

Returns the local time unix timestamp.

DeltaTime

float DeltaTime get

The completion time in seconds since the last frame.

PreviewServer

bool PreviewServer get

Return true if in preview server.

ComponentName

string ComponentName get

The name of this component.

dv

DynValue

key

string

A unique identifier used to store and look up the user's tracking consent.

key

string

A unique identifier used to store and look up the user's tracking consent.

privacynotice

string

The privacy notice text to display in the consent dialog.

callback

Closure

A function invoked with one boolean parameter: true if allowed, false otherwise.

force

bool

name

string

Name of the Resource as set in the Scripting Runtime Component (Resources section)

eventName

string

The name of the analytics event.

value

float

A numeric value associated with the event.

position

SVector

A world position to associate with the event.

SResource
SVector
SInventory
SPersistence
SScene
SGrid
SHost
SPhysics
SMath
SString
SInput
SCameraManager
SWebService
SNetwork
SPostFX
SUI
SDialogues
SShared
SQuests
SEconomy
SGroup
SRenderSettings
SProfile
SPhotos
SVideos
SResource
typeName = Space.TypeName("123")
isTrackingAllowed = Space.TrackingAllowed('3423423423423')

If true, show the prompt even if a stored decision exists. Defaults to false.

-- Request consent (white-label only). The callback receives a boolean 'allowed'.
Space.TrackingRequest('24234234234234', 'A notice message', function(allowed)
    if allowed then
        Space.Log("Tracking allowed")
    else
        Space.Log("Tracking denied")
    end
end)
-- or force re-prompt even if a decision was saved previously:
Space.TrackingRequest('24234234234234', 'A notice message', function(allowed) end, true)
aResource = Space.GetResource("ResourceName")
Space.LogEvent('event name', 2.0, Vector.New(0,0,0) )
Space.Log(Color.Blue)
--or
Space.Log("Log")
--or
Space.Log("Log",true)
inventory  = Space.Inventory
persistence = Space.Persistence
scene = Space.Scene
grid = Space.Grid
host = Space.Host
physics = Space.Physics
Space.Math.Ceil(4.0)
Space.String.GetBytes("some data")
Space.Input.Vibrate(1,1,false)
obj = Space.Host.ExecutingObject
Space.Camera.LockCamera (obj)
Space.WebServices.GetImage("example.com/mrlee.jpg")
Space.Network.SubscribeToNetwork("helloworld", gotAMessageFunction)
Space.PostFX
Space.AudioAnalyser
Space.Tween
ui = Space.UI
dialogues = Space.Dialogues
shared = Space.Shared
quests = Space.Quests
economy = Space.Economy
groups = Space.Groups
activity = Space.Activity
renderSettings = Space.RenderSettings
profile = Space.Profile
photos = Space.Photos
videos = Space.Videos
musicDirectory = Space.MusicDirectory
journey = Space.Journey
gameTester = Space.GameTester
runtimeType = Space.RuntimeType
platform = Space.Platform
sessionID = Space.SessionID
isInEditor = Space.InEditor
--the below script checks if we are in Unity editor or in SS
--this way we can provide an alternative
--(Example: if we're using a function that doesn't work in Unity editor)

thisGameObject = Space.Host.ExecutingObject


if Space.InEditor then
avatarUsername = "Player Name"
else
avatarUsername = Space.Scene.GetAvatar(thisGameObject.Owner).Username --example: this doesn't work in Editor
end

Space.Log(avatarUsername)
viewerVersion = Space.Version
viewerVersionString = Space.FullVersionString
tableOfResources = Space.Resources
--the below script will search through the Scripting Runtime's resources
--and return the first instance of an Animation Clip
--[You need to add a few resources to the scripting runtime and make one of them an animation]


resources = Space.Resources

for i = 1, #resources do
 if resources[i].Type == "AnimationClip" then
  Space.Log("Resource #".. i .. " is an Animation Clip. The resource name is: " .. resources[i].Name)
  break
 end
  end
floatTime = Space.Time
--this script will update a UIText object with the current local time without using a coroutine
--(example: clock )
--[UIText object needs to be added to the references section in the scripting runtime with name "Text"]

rateUpdate = 1.0
nextUpdate = 0.0
text = Space.Host.GetReference("Text").UIText


OnUpdate = function()
        if Space.Time > nextUpdate then
          nextUpdate = Space.Time + rateUpdate
          text.Text = Space.LocalTime
          end
    }
    
Space.Host.ExecutingObject.OnUpdate(OnUpdate)
serverTime = Space.ServerTime
--this script will update a UIText object with the current server time (UTC)
--(example: clock)
--[UIText object needs to be added to the references section in the scripting runtime with name "Text"]

text = Space.Host.GetReference("Text").UIText

co = function()
  while true do
   text.Text = Space.ServerTime
    coroutine.yield(1)
  end
end

Space.Host.StartCoroutine(co)
localTime = Space.LocalTime
--this script will update a UIText object with the current local time
--(example: clock)
--[UIText object needs to be added to the references section in the scripting runtime with name "Text"]

text = Space.Host.GetReference("Text").UIText

co = function()
  while true do
   text.Text = Space.LocalTime
    coroutine.yield(1)
  end
end

Space.Host.StartCoroutine(co)
loginTime = Space.LoginTime
--this script will update a UIText object with how long the user has been logged in (in seconds)
--(example: clock)
--[UIText object needs to be added to the references section in the scripting runtime with name "Text"]

text = Space.Host.GetReference("Text").UIText

co = function()
  while true do
   text.Text = Space.LoginTime
    coroutine.yield(1)
  end
end

Space.Host.StartCoroutine(co)
serverTimeUnix = Space.ServerTimeUnix
--this script will update a UIText object with the current server time unix timestamp
--(example: clock)
--[UIText object needs to be added to the references section in the scripting runtime with name "Text"]

text = Space.Host.GetReference("Text").UIText

co = function()
  while true do
   text.Text = Space.ServerTimeUnix
    coroutine.yield(1)
  end
end

Space.Host.StartCoroutine(co)
localTimeUnix = Space.LocalTimeUnix
--this script will update a UIText object with the current local time unix timestamp
--(example: clock)
--[UIText object needs to be added to the references section in the scripting runtime with name "Text"]

text = Space.Host.GetReference("Text").UIText

co = function()
  while true do
   text.Text = Space.LocalTimeUnix
    coroutine.yield(1)
  end
end

Space.Host.StartCoroutine(co)
deltaTime = Space.DeltaTime
--the below script rotates an object around Y axis but uses DeltaTime 
--to make sure it's not dependant on client's Framerate (FPS)
--this way the object rotates per second not per frame
--(Example: Important movement in OnUpdate)

thisGameObject = Space.Host.ExecutingObject



OnUpdate = function()
currentY = thisGameObject.WorldRotation.EulerAngles.Y
newRotation = Quaternion.Euler(0, currentY + 1 * Space.DeltaTime, 0) --We multiplied 1 by Space.DeltaTime
thisGameObject.WorldRotation = newRotation
end

thisGameObject.OnUpdate(OnUpdate)
isInPreview = Space.PreviewServer
--this script will update a UIText object with "preview" or "live" depending
--whether we are on preview server or live server
--[UIText object needs to be added to the references section in the scripting runtime with name "Text"]

text = Space.Host.GetReference("Text").UIText

OnUpdate = function()
  if Space.PreviewServer then
    text.Text = "Preview"
  else
    text.Text = "Live"
  end
end

Space.Host.ExecutingObject.OnUpdate(OnUpdate)
componentName = Space.ComponentName

SScene

Index

Functions Index

Function Name

Properties Index

Property Name

Functions

Find

Find (string name)

Finds a single Game Object matching 'Name' and returns it. Can use '/' characters to designate a path (e.g. 'Parent/Child' returns Child with 'Parent')

Parameter
Type
Description

FindID

FindID (string id)

Finds a single Game Object using ID and returns it

Parameter
Type
Description

MarkObjectTemporary

void MarkObjectTemporary ( obj)

Marks the Game Object as temporary. Temporary objects will be cleaned up automatically if the script is destroyed or reset. Can be used to handle cleanup from procedural objects created by a script.

Parameter
Type
Description

GetAvatar

GetAvatar (long id) GetAvatar (string name)

Get reference to an avatar

Parameter
Type
Description

CreateGameObject

CreateGameObject (string name) CreateGameObject ( resource)

Creates a game object from the specified resource

Parameter
Type
Description

SwitchToInstance

void SwitchToInstance (uint id)

Switch to a shard region.

Parameter
Type
Description

OnPlayerJoin

void OnPlayerJoin (Closure e)

Event which fires whenever a player joins the region

Parameter
Type
Description

OnPlayerLeave

void OnPlayerLeave (Closure e)

Event which fires whenever a player leaves the region

Parameter
Type
Description

OnEditModeStart

void OnEditModeStart (Closure e)

An event which is fired when player enters Room Edit mode

Parameter
Type
Description

OnEditModeEnd

void OnEditModeEnd (Closure e)

An event which is fired when player exits Room Edit mode

Parameter
Type
Description

OnEditModeAdd

void OnEditModeAdd (Closure e)

An event which is fired when object is added during Edit Mode

Parameter
Type
Description

OnEditModeRemove

void OnEditModeRemove (Closure e)

An event which is fired when object is deleted during Edit Mode

Parameter
Type
Description

Properties

PlayerAvatar

PlayerAvatar get

Returns the current player avatar. If this script is calling this upon initialisation, the Player may not exist yet, and you will want to wait a few frames until the avatar is present before continuing.

Avatars

[] Avatars get

Returns a list of Avatars in the scene

AllAvatars

List< > AllAvatars get

Returns a list of all avatars in the scene. The player avatar that is calling this will be added to the end of the list.

Population

int Population get

Property Description

Objects

[] Objects get

Returns a list of Objects in the scene. IMPORTANT: This function is slow, you should cache the result and avoid calling this every frame.

Name

string Name get

Returns the name of the current region

Url

string Url get

Returns the URL of the current region

RegionID

long RegionID get

Returns the region ID of current region.

InstanceID

long InstanceID get

Return the instance ID of current region.

Owner

long Owner get

Returns the avatar ID of the regions owner

PlayerIsOwner

bool PlayerIsOwner get

Returns whether the current player is the owner of the region

PlayerIsAdmin

bool PlayerIsAdmin get

Does this Player have the Admin role?

PlayerIsModerator

bool PlayerIsModerator get

Does this Player have the Moderator role?

PlayerIsDeveloper

bool PlayerIsDeveloper get

Does this Player have the Developer role?

PlayerIsTrusted

bool PlayerIsTrusted get

Does this Player have the Trusted role?

IsInEditMode

bool IsInEditMode get

Returns true if current player is in edit mode.

Floors

[] Floors get

Return an array of all floors in the region.

Landmarks

[] Landmarks get

Return all Landmarks in the region

bool get

bool get

bool get

bool get

bool get

bool get

SGameObject[] get

SLandmark[] get

SGameObject Find (string name)

SGameObject FindID (string id)

void MarkObjectTemporary (SGameObject obj)

SAvatar GetAvatar (long id) SAvatar GetAvatar (string name)

SGameObject CreateGameObject (string name) SGameObject CreateGameObject (SResource resource)

void SwitchToInstance (uint id)

void OnPlayerJoin (Closure e)

void OnPlayerLeave (Closure e)

void OnEditModeStart (Closure e)

void OnEditModeEnd (Closure e)

void OnEditModeAdd (Closure e)

SAvatar PlayerAvatar get

SAvatar[] Avatars get

List< SAvatar > AllAvatars get

int Population get

SGameObject[] Objects get

string Name get

string Url get

long RegionID get

long InstanceID get

e

Closure (Callback)

e(SAvatar)

e

Closure (Callback)

e(long)

SGameObject
SGameObject
SGameObject
SAvatar
SAvatar
SGameObject
SGameObject
SResource
SAvatar
SAvatar
SAvatar
SGameObject
SGameObject
SLandmark

void (Closure e)

long get

 Space.Scene.Find('Door2')
hand = Space.Scene.Find("Hand");
--This returns the GameObject named Hand.

hand = Space.Scene.Find("/Hand");
--This returns the GameObject named Hand.
--Hand must not have a parent in the Hierarchy view.

hand = Space.Scene.Find("/Monster/Arm/Hand");
--This returns the GameObject named Hand,
--which is a child of Arm > Monster.
--Monster must not have a parent in the Hierarchy view.

hand = Space.Scene.Find("Monster/Arm/Hand");
--This returns the GameObject named Hand,
--which is a child of Arm > Monster. 
--add Scene Object Database to a Gameobject, set "123" to IDs and name the GameObject "Cube".
local obj=Space.Scene.FindID("123")
Space.Log(obj.Name);
--print "Cube" if the object exists.
Space.Scene.MarkObjectTemporary(AnObjectReference)
theAvatar =Space.Scene.GetAvatar(43)
--or
theAvatar =Space.Scene.GetAvatar("TestUser")
Space.Scene.CreateGameObject('NewBall')
--or
Space.Scene.CreateGameObject(Space.Resources[1])
--clicking this object will create a GameObject from a resource and place it above our avatar

thisObject = Space.Host.ExecutingObject
thisPlayer = Space.Scene.PlayerAvatar

resource = Space.GetResource("Tomato")  --add it as resource in your Scripting Runtime component

OnClick = function()
createdObject = Space.Scene.CreateGameObject(resource)    
createdObject.WorldPosition = thisPlayer.GameObject.WorldPosition + thisPlayer.GameObject.Up
end

thisObject.AddClickable()
thisObject.Clickable.OnClick(OnClick)
Space.Scene.SwitchToInstance(2)
--Place this script in a UIText object and it will
--update itself with the name of the last player joined

function updateText(Av) --we include "Av" here because the event gives us a reference to the Avatar that joined
Space.Host.ExecutingObject.UIText.Text= "Last player joined: " .. Av.Username
end

Space.Scene.OnPlayerJoin(updateText) -- updateText will now be called everytime a player joins
 function playerLeft(id) 
--
end
Space.Scene.OnPlayerLeave(playerLeft) 
--Place this script in a UIText object and it will
--update itself with the name of the last player left

function updateText(Av) --we include "Av" here because the event gives us a reference to the Avatar that has left
Space.Host.ExecutingObject.UIText.Text= "Last player left: " .. Av.Username
end

Space.Scene.OnPlayerLeave(updateText) -- updateText will now be called every time a player leaves
Space.Scene.OnEditModeStart(AFunctionName)
--makes an object become active upon entering edit mode
thisObject = Space.Host.ExecutingObject
targetObject = Space.Host.GetReference("target") --add to references in Scripting Runtime component

function OnEditModeFunction()
  targetObject.Active = true
end


Space.Scene.OnEditModeStart(OnEditModeFunction)
Space.Scene.OnEditModeEnd(AfunctionName)
--makes an object become active upon exiting edit mode
thisObject = Space.Host.ExecutingObject
targetObject = Space.Host.GetReference("target") --add to references in Scripting Runtime component

function OnEditModeFunction()
  targetObject.Active = false
end


Space.Scene.OnEditModeEnd(OnEditModeFunction)
Space.Scene.OnEditModeAdd(AFunctionName)
--prints the total number of objects in the scene whenever a new object is added in edit mode

  function OnEditModeFunction()
   Space.Log(#Space.Scene.Objects)
  end


  Space.Scene.OnEditModeAdd(OnEditModeFunction)
Space.Scene.OnEditModeRemove(AFunctionName)
--prints the total number of objects in the scene whenever a new object is removed in edit mode

  function OnEditModeFunction()
   Space.Log(#Space.Scene.Objects)
  end


  Space.Scene.OnEditModeRemove(OnEditModeFunction)
 CurrentPlayer = Space.Scene.PlayerAvatar 
avatars = Space.Scene.Avatars  
--this script, once clicked, will get all avatars in the scene
--and print their ID, Username and Title (excluding self)
--(Example: scoreboards/radars/scanners/game machines)

thisGameObject = Space.Host.ExecutingObject

OnClick = function()
Avatars = Space.Scene.Avatars

      if #Avatars > 0 then
            for var=1, #Avatars do
        local ID = Avatars[var].ID
        local Username = Avatars[var].Username
        local Title = Avatars[var].Title
        if Title == "" then Title = "None" end

         Space.Log("ID: " .. ID .. ", Username: " .. Username .. ", Title: " .. Title)
            end

      else
      Space.Log("No Avatars")
      end
end
 
thisGameObject.AddClickable() 
thisGameObject.Clickable.Tooltip = "Click to print all avatars' information"
thisGameObject.Clickable.OnClick(OnClick) 
local avatars=Space.Scene.AllAvatars
Space.Log(#avatars)
--Print the length of AllAvatars.
 --this script, once clicked, will get all avatars in the scene
--and print their ID, Username and Title (including self)
--(Example: scoreboards/radars/scanners/game machines)

thisGameObject = Space.Host.ExecutingObject

OnClick = function()
allAvatars = Space.Scene.AllAvatars

    for var=1, #allAvatars do
local ID = allAvatars[var].ID
local Username = allAvatars[var].Username
local Title = allAvatars[var].Title
if Title == "" then Title = "None" end

 Space.Log("ID: " .. ID .. ", Username: " .. Username .. ", Title: " .. Title)
    end

end

 
thisGameObject.AddClickable() 
thisGameObject.Clickable.Tooltip = "Click to print all avatars' information"
thisGameObject.Clickable.OnClick(OnClick) 
currentPopulation = Space.Scene.Population
 objects = Space.Scene.Objects 
--clicking this object will print a name of every object in the scene
--[better use a coroutine incase the foor loop exceeds allowed frame time]
  thisObject = Space.Host.ExecutingObject

  OnClickFunction = function()
    local objects = Space.Scene.Objects
    for i=1, #objects, 1 do
      Space.Log(objects[i].Name)
    end
  end

  thisObject.AddClickable()
RegionName = Space.Scene.Name 
--this object will be clickable only if it is in a region called "X Region"
--((for example: limiting object functionality to a specific region))

thisObject = Space.Host.ExecutingObject


OnClick = function()
Space.Log("We are in X Region")
end


if Space.Scene.Name == "X Region" then
thisObject.AddClickable()
thisObject.Clickable.OnClick(OnClick)
end
RegionUrl = Space.Scene.Url 
--the URL of this region will be placed in a UIText upon loading 
--and also printed if this object is clicked
thisObject = Space.Host.ExecutingObject
textObject = Space.Host.GetReference("textObject") -- add to scripting runtime references


function OnClick()
  Space.Log(Space.Scene.Url)
end

textObject.UIText.Text = Space.Scene.Url
thisObject.AddClickable()
thisObject.Clickable.OnClick(OnClick)
Space.Log(Space.Scene.RegionID)
--the RegionID of this region will be placed in a UIText upon loading 
--and also printed if this object is clicked
thisObject = Space.Host.ExecutingObject
textObject = Space.Host.GetReference("textObject") -- add to scripting runtime references


function OnClick()
  Space.Log(Space.Scene.RegionID)
end

textObject.UIText.Text = Space.Scene.RegionID
thisObject.AddClickable()
thisObject.Clickable.OnClick(OnClick)
instanceID = Space.Scene.InstanceID
--the RegionID of this region will be placed in a UIText upon loading 
--and also printed if this object is clicked
thisObject = Space.Host.ExecutingObject
textObject = Space.Host.GetReference("textObject") -- add to scripting runtime references


function OnClick()
  Space.Log(Space.Scene.InstanceID)
end

textObject.UIText.Text = Space.Scene.InstanceID
thisObject.AddClickable()
thisObject.Clickable.OnClick(OnClick)
RegionOwner = Space.Scene.Owner
--this script will make this object only clickable for the region owner

thisObject = Space.Host.ExecutingObject
thisPlayer = Space.Scene.PlayerAvatar

OnClick = function()
Space.Log("Do Something")
end

if thisPlayer.ID == Space.Scene.Owner then 
thisObject.AddClickable()
thisObject.Clickable.OnClick(OnClick)
end
isOwner = Space.Scene.PlayerIsOwner 
--this script will make the object a clickable, but only if player is region owner
--(Example: Access control)

thisGameObject = Space.Host.ExecutingObject

OnClick = function()
Space.Log("this click was only possible because you are a region Owner")
end

if Space.Scene.PlayerIsOwner then
thisGameObject.AddClickable()
thisGameObject.Clickable.Tooltip = "Click me"
thisGameObject.Clickable.OnClick(OnClick) 
end
Space.Scene.PlayerIsAdmin
--this script will make the object a clickable, but only if player is region Admin
--(Example: Access control)

thisGameObject = Space.Host.ExecutingObject

OnClick = function()
Space.Log("this click was only possible because you are a region Admin")
end

if Space.Scene.PlayerIsAdmin then
thisGameObject.AddClickable()
thisGameObject.Clickable.Tooltip = "Click me Admin"
thisGameObject.Clickable.OnClick(OnClick) 
end
playerIsModerator = Space.Scene.PlayerIsModerator
--this script will make the object a clickable, but only if player is Moderator in this region
--(Example: Access control)

thisGameObject = Space.Host.ExecutingObject

OnClick = function()
Space.Log('this click was only possible because you are Moderator in this region')
end

if Space.Scene.PlayerIsModerator then
thisGameObject.AddClickable()
thisGameObject.Clickable.Tooltip = "Click me Moderator"
thisGameObject.Clickable.OnClick(OnClick) 
end
playerIsDeveloper = Space.Scene.PlayerIsDeveloper
playerIsTrusted = Space.Scene.PlayerIsTrusted
--this script will make the object a clickable, but only if player is Trusted in this region
--(Example: Access control)

thisGameObject = Space.Host.ExecutingObject

OnClick = function()
Space.Log("this click was only possible because you are Trusted in this region")
end

if Space.Scene.PlayerIsTrusted then
thisGameObject.AddClickable()
thisGameObject.Clickable.Tooltip = "Click me Trusted"
thisGameObject.Clickable.OnClick(OnClick) 
end
Space.Log(Space.Scene.IsInEditMode)
--makes an object only active when this player is in Edit Mode
thisObject = Space.Host.ExecutingObject
targetObject = Space.Host.GetReference("target") --add to references in Scripting Runtime component

function OnUpdateFunction()
  targetObject.Active = Space.Scene.IsInEditMode 
end


thisObject.OnUpdate(OnUpdateFunction)
for i=1,#Space.Scene.Floors do
    Space.Log(Space.Scene.Floors[i].Name)
end
--print all floor names.
example 2
        local landmark = Space.Scene.Landmarks
        for i = 1,#landmark do
    if landmark[i].Type == LandmarkType.LandingZone then
        Space.Log("LandingZone")
        end
                Space.Log(landmark[i].Name .. " ".. landmark[i].Position.ToString())
        end
OnEditModeRemove
Owner
PlayerIsOwner
PlayerIsAdmin
PlayerIsModerator
PlayerIsDeveloper
PlayerIsTrusted
IsInEditMode
Floors
Landmarks