Creating the UI
Under hierarchy, right-click to create a UI -> Canvas. At the same time, Unity will create an Event System that allows us to interact with the canvas.
To test out the interaction, we'll add a button, a slider, and a drop-down box.
And if we press play here, we have a fully working UI; however, not with VR.
Right now the canvas is set to Render Mode = Screen Space - Overlay which means in VR, we won't be able to see it but we're able to interact with it using our mouse.
What we want is either Screen Space - Camera or World Space.
Screen Space - Camera = follows the character's head movements. Useful for displaying information specific to the player can constantly have it displayed i.e) an HP bar
World Space = lives in the environment and you can interact with it by walking up to or just visually seeing the UI.
For both Screen Space - Camera and World Space, it's best to use our XR Rig Camera as the Event Camera.
Interacting With UI
Add a Tracked Device Graphic Raycast to our canvas.
Replace Basic Module with XRUI Input Module.
Note
If your ray interaction gets stuck within the canvas, go to XR Rig Camera and change its Tag type from Untagged to the Main Camera

