|
|
Line 1: |
Line 1: |
− | SUICanvas is root component for UI elements.
| + | This page has moved to: https://docs.sine.space/v/scripting/client-scripting/components/suicanvas |
− | | + | |
− | =Properties=
| + | |
− | | + | |
− | | + | |
− | {{ScriptFunction|bool|IsRootCanvas|{get;}|The avoidance radius for the agent.|5=local canvas=Space.Host.GetReference("Canvas").UICanvas<br>
| + | |
− | Space.Log(canvas.IsRootCanvas)<br>
| + | |
− | ''--print true.''
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|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.|5=local canvas=Space.Host.GetReference("Canvas").UICanvas<br>
| + | |
− | Space.Log(canvas.ScaleFactor)<br>
| + | |
− | ''--return scale factor.''
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|float|ScaleFactor|{get; set;}|Scales all UI elements in the Canvas by this factor.|5=local canvas=Space.Host.GetReference("Canvas").UICanvas<br>
| + | |
− | Space.Log(canvas.ReferencePixelsPerUnit)<br>
| + | |
− | ''--return reference pixels per unit.''
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|bool|PixelPerfect|{get; set;}|Should the UI be rendered without antialiasing for precision?|5=local canvas=Space.Host.GetReference("Canvas").UICanvas<br>
| + | |
− | Space.Log(canvas.PixelPerfect)
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|float|PlaneDistance|{get; set;}|The distance at which the UI plane should be placed in front of the camera.|5=local canvas=Space.Host.GetReference("Canvas").UICanvas<br>
| + | |
− | Space.Log(canvas.PlaneDistance)<br>
| + | |
− | ''--return plane distance.''
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|int|SortingOrder|{get; set;}|Canvas' order within a sorting layer.|5=local canvas=Space.Host.GetReference("Canvas").UICanvas<br>
| + | |
− | Space.Log(canvas.SortingOrder)<br>
| + | |
− | ''--return sorting order.''
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|int|TargetDisplay|{get; set;}|For Overlay mode, display index on which the UI canvas will appear.|5=local canvas=Space.Host.GetReference("Canvas").UICanvas<br>
| + | |
− | Space.Log(canvas.TargetDisplay)
| + | |
− | }}
| + | |
− | | + | |
− | | + | |
− | {{ScriptFunction|float|NormalizedSortingGridSize|{get; set;}|The normalized grid size that the canvas will split the renderable area into.|5=local canvas=Space.Host.GetReference("Canvas").UICanvas<br>
| + | |
− | Space.Log(canvas.NormalizedSortingGridSize)<br>
| + | |
− | ''--return normalized sorting grid size.''
| + | |
− | }}
| + | |
− | | + | |
− | {{Scripting Navbox}}
| + | |