Sinespace Client  2023.2.17543
Client-side scripting for Sinespace
SineSpace.Scripting.Components.SUICanvas Class Reference
Inheritance diagram for SineSpace.Scripting.Components.SUICanvas:
ScriptClassComponent< Canvas >

Properties

bool IsRootCanvas [get]
 Is this the root Canvas? More...
 
float ScaleFactor [get, set]
 Scales all UI elements in the Canvas by this factor. More...
 
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. More...
 
bool PixelPerfect [get, set]
 Should the UI be rendered without antialiasing for precision? More...
 
float PlaneDistance [get, set]
 The distance at which the UI plane should be placed in front of the camera. More...
 
int SortingOrder [get, set]
 Canvas' order within a sorting layer. More...
 
int TargetDisplay [get, set]
 For Overlay mode, display index on which the UI canvas will appear. More...
 
float NormalizedSortingGridSize [get, set]
 Normalized grid size. More...
 
- Properties inherited from ScriptClassComponent< Canvas >
SGameObject GameObject [get]
 Return the GameObject which component added. More...
 

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)