Adding a VR input module
There are plenty of similarities between traditional game development and VR game development, but UI input isn't one of them. Most game input relies on screen bounds to position UI elements and capture mouse coordinates, but in VR, the "screen" is all around you, and the added depth gives you an entire new dimension to work with.
With that in mind, it takes a little extra work to define constraints that allow input to work in VR. In this section, we'll add a new input module to our player that will let them send messages to Unity's UI system.
Expand your OVRPlayerController object in the hierarchy and find the CenterEyeAnchor object inside of the OVRCameraRig child. Create a new Camera object as a child of CenterEyeAnchor and name it UICamera
:
Highlight the new camera in the Inspector panel and set the Culling Mask property to Nothing. Also, remove the AudioListener component from the camera by right-clicking on it and selecting Remove Component. Finally, set the...