wiki.sine.space | sinespace

Scripting/SGraphicRaycaster

From wiki.sine.space
Revision as of 11:22, 24 September 2021 by Voidtech (Talk | contribs) (Created page with "=Members= {{ScriptFunction|SUIRaycastResult|Raycast|()|Perform the raycast against the list of graphics associated with the Canvas and returns first UI raycast result.|5=<pr...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Members

Raycast

SUIRaycastResult Raycast ()

Perform the raycast against the list of graphics associated with the Canvas and returns first UI raycast result.

local trans = Space.Host.ExecutingObject
local canvas = Space.Host.GetReference("Canvas")
local gr = canvas.GraphicRaycaster
function Update()
    local raycast = gr.Raycast()
    Space.Log(raycast.ToString())
end
trans.OnUpdate(Update)


Properties

RenderOrderPriority

int RenderOrderPriority { get;set; }

Priority of the raycaster based upon render order.


Space.Host.ExecutingObject.GraphicRaycaster.RenderOrderPriority = 1



SortOrderPriority

int SortOrderPriority { get;set; }

Priority of the raycaster based upon sort order.


Space.Host.ExecutingObject.GraphicRaycaster.SortOrderPriority= 1