Breakroom is now Sinewave Campus. Book a meeting

SGraphicRaycaster

ClientComponents
On this classRaycast
  1. Functions
  2. Raycast
  3. Properties
  4. SortOrderPriority
  5. RenderOrderPriority
  6. GameObject
Members 4
FunctionRaycastPerform the raycast against the list of graphics associated with the Canvas and returns first UI raycast result.
PropertySortOrderPriorityPriority of the raycaster based upon render orderPriority of the raycaster based upon sort order.
PropertyRenderOrderPriorityPriority of the raycaster based upon render order.
PropertyGameObject–

Functions​

Raycast​

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

Returns

SUIRaycastResult

Example

Lua
raycastResult = Space.Host.ExecutingObject.GraphicRaycaster.Raycast()
Lua
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​

SortOrderPriorityRead only​

int SortOrderPriority {get; }

Priority of the raycaster based upon render orderPriority of the raycaster based upon sort order.

Example

Lua
Space.Host.ExecutingObject.GraphicRaycaster.SortOrderPriority= 1

RenderOrderPriorityRead only​

int RenderOrderPriority {get; }

Priority of the raycaster based upon render order.

Example

Lua
Space.Host.ExecutingObject.GraphicRaycaster.RenderOrderPriority = 1

GameObjectRead only​

SGameObject GameObject {get; }

Example

Lua
theGameObject = Space.Host.ExecutingObject.GraphicRaycaster.GameObject