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

Properties

bool IsRootCanvas [get]
 Is this the root Canvas?
 
float ScaleFactor [get, set]
 Scales all UI elements in the Canvas by this factor.
 
float ReferencePixelsPerUnit [get, set]
 If a sprite has this “Pixels Per Unit” setting, then one pixel in the sprite will cover one unit in the UI.
 
bool PixelPerfect [get, set]
 Should the UI be rendered without antialiasing for precision?
 
float PlaneDistance [get, set]
 The distance at which the UI plane should be placed in front of the camera.
 
int SortingOrder [get, set]
 Canvas' order within a sorting layer.
 
int TargetDisplay [get, set]
 For Overlay mode, display index on which the UI canvas will appear.
 
float NormalizedSortingGridSize [get, set]
 Normalized grid size.
 
- 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

- 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)
 
- Protected Member Functions inherited from ScriptClass
void Initialise (SScript runtime)
 

Property Documentation

◆ IsRootCanvas

bool SineSpace.Scripting.Components.SUICanvas.IsRootCanvas
get

Is this the root Canvas?

local canvas=Space.Host.GetReference("Canvas").UICanvas
&ndash;add Canvas to object references.
Space.Log(canvas.IsRootCanvas)
&ndash;print true.

◆ NormalizedSortingGridSize

float SineSpace.Scripting.Components.SUICanvas.NormalizedSortingGridSize
getset

Normalized grid size.

local canvas=Space.Host.GetReference("Canvas").UICanvas
&ndash;add Canvas to object references.
Space.Log(canvas.NormalizedSortingGridSize)
&ndash;return normalized sorting grid size.

◆ PixelPerfect

bool SineSpace.Scripting.Components.SUICanvas.PixelPerfect
getset

Should the UI be rendered without antialiasing for precision?

local canvas=Space.Host.GetReference("Canvas").UICanvas
&ndash;add Canvas to object references.
Space.Log(canvas.PixelPerfect)

◆ PlaneDistance

float SineSpace.Scripting.Components.SUICanvas.PlaneDistance
getset

The distance at which the UI plane should be placed in front of the camera.

local canvas=Space.Host.GetReference("Canvas").UICanvas
&ndash;add Canvas to object references.
Space.Log(canvas.PlaneDistance)
&ndash;return plane distance.

◆ ReferencePixelsPerUnit

float SineSpace.Scripting.Components.SUICanvas.ReferencePixelsPerUnit
getset

If a sprite has this “Pixels Per Unit” setting, then one pixel in the sprite will cover one unit in the UI.

local canvas=Space.Host.GetReference("Canvas").UICanvas
&ndash;add Canvas to object references.
Space.Log(canvas.ReferencePixelsPerUnit)
&ndash;return reference pixels per unit.

◆ ScaleFactor

float SineSpace.Scripting.Components.SUICanvas.ScaleFactor
getset

Scales all UI elements in the Canvas by this factor.

local canvas=Space.Host.GetReference("Canvas").UICanvas
&ndash;add Canvas to object references.
Space.Log(canvas.ScaleFactor)
&ndash;return scale factor.

◆ SortingOrder

int SineSpace.Scripting.Components.SUICanvas.SortingOrder
getset

Canvas' order within a sorting layer.

local canvas=Space.Host.GetReference("Canvas").UICanvas
&ndash;add Canvas to object references.
Space.Log(canvas.SortingOrder)
&ndash;return sorting order.

◆ TargetDisplay

int SineSpace.Scripting.Components.SUICanvas.TargetDisplay
getset

For Overlay mode, display index on which the UI canvas will appear.

local canvas=Space.Host.GetReference("Canvas").UICanvas
&ndash;add Canvas to object references.
Space.Log(canvas.TargetDisplay)