SGraphicRaycaster
客户端组件
在此类中Raycast
成员 4
| 函数 | Raycast | Perform the raycast against the list of graphics associated with the Canvas and returns first UI raycast result. |
| 属性 | SortOrderPriority | Priority of the raycaster based upon render orderPriority of the raycaster based upon sort order. |
| 属性 | RenderOrderPriority | Priority of the raycaster based upon render order. |
| 属性 | GameObject | – |
函数
Raycast
Perform the raycast against the list of graphics associated with the Canvas and returns first UI raycast result.
返回值
SUIRaycastResult
示例
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)
属性
SortOrderPriority只读
int SortOrderPriority {get; }
Priority of the raycaster based upon render orderPriority of the raycaster based upon sort order.
示例
Lua
Space.Host.ExecutingObject.GraphicRaycaster.SortOrderPriority= 1
RenderOrderPriority只读
int RenderOrderPriority {get; }
Priority of the raycaster based upon render order.
示例
Lua
Space.Host.ExecutingObject.GraphicRaycaster.RenderOrderPriority = 1
GameObject只读
示例
Lua
theGameObject = Space.Host.ExecutingObject.GraphicRaycaster.GameObject



