Breakroom is now Sinewave Campus. Book a meeting

SGraphicRaycaster

ClientComposants
Dans cette classeRaycast
  1. Fonctions
  2. Raycast
  3. Propriétés
  4. SortOrderPriority
  5. RenderOrderPriority
  6. GameObject
Membres 4
FonctionRaycastPerform the raycast against the list of graphics associated with the Canvas and returns first UI raycast result.
PropriétéSortOrderPriorityPriority of the raycaster based upon render orderPriority of the raycaster based upon sort order.
PropriétéRenderOrderPriorityPriority of the raycaster based upon render order.
PropriétéGameObject–

Fonctions​

Raycast​

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

Valeurs de retour

SUIRaycastResult

Exemple

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)

Propriétés​

SortOrderPriorityLecture seule​

int SortOrderPriority {get; }

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

Exemple

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

RenderOrderPriorityLecture seule​

int RenderOrderPriority {get; }

Priority of the raycaster based upon render order.

Exemple

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

GameObjectLecture seule​

SGameObject GameObject {get; }

Exemple

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