VRTK_UICanvas
Overview
The UI Canvas is used to denote which World Canvases are interactable by a UI Pointer.
When the script is enabled it will disable the Graphic Raycaster
on the canvas and create a custom UI Graphics Raycaster
and the Blocking Objects and Blocking Mask settings are copied over from the Graphic Raycaster
.
Inspector Parameters
- Click On Pointer Collision: Determines if a UI Click action should happen when a UI Pointer game object collides with this canvas.
- Auto Activate Within Distance: Determines if a UI Pointer will be auto activated if a UI Pointer game object comes within the given distance of this canvas. If a value of
0
is given then no auto activation will occur.
Example
VRTK/Examples/034_Controls_InteractingWithUnityUI
uses the VRTK_UICanvas
script on two of the canvases to show how the UI Pointer can interact with them.
Updated less than a minute ago