Creating the menu with GUITextures and mouse events
In this first approach, we'll create a menu that uses a texture with a transparent background presented as a GUITexture, in the same way as we have just done with our main title logo.
We will then need to write a script in order to make the texture receive mouse events for mouse enter, mouse exit, and mouse down/up actions.
Adding the play button
In the Book Assets | Textures folder in the Project panel, select the texture called menu_playBtn. Go to GameObject | Create Other | GUITexture or select GUITexture from the Hierarchy Create button menu as before. Select the menu_playBtn object in the Hierarchy that you have just made and in the Inspector, set its Transform Position values to (0.3, 0.55 ...
Get Unity 3.x Game Development Essentials 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.