Time for action – prepare the GUI

In Unity, GUIs are coded in Scripts, which are attached to GameObject. Let's create an empty GameObject and then attach a new script to it:

  1. Navigate to GameObject | Create Empty. A GameObject called "GameObject" appears in the Hierarchy panel:
    Time for action – prepare the GUI
  2. Click on the GameObject in the Hierarchy panel and press F2. Rename it TitleScreen:
    Time for action – prepare the GUI
  3. In the Inspector panel, position the TitleScreen GameObject at x:0 y:1 z:0.
  4. Right-click /alternate-click on a blank space in the Project panel and navigate to Create | JavaScript.
  5. Rename the new script ...

Get Unity 4.x Game Development by Example Beginner's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.