Constructing a simple menu
Now that we've got an input module to process input from our HMD, we can start constructing an interactive menu as our first UI element. We'll start simple and then move onto more complex functionality before establishing in-game UI elements in the next section.
Setting up a canvas
In Unity's UGUI system, every UI element must be a child of a Canvas object. A default canvas is created any time a UI element is added to a scene, but you can also add elements directly to an existing canvas and group individual elements together under one system.
In this section, we'll create a canvas to group our main menu elements together and some buttons to start and quit the game.
Open the Create menu in your hierarchy and select Canvas in the UI list. Right-click on your new Canvas object and select Image under UI; this will create an image-based UI element and make it a child of your new canvas. Your new objects in the hierarchy should now look as follows:
If you center the new...