O'Reilly logo

Mastering Oculus Rift Development by Jack Donovan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required