Reader small image

You're reading from  Unity Game Development Essentials

Product typeBook
Published inOct 2009
Reading LevelIntermediate
PublisherPackt
ISBN-139781847198181
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Will Goldstone
Will Goldstone
author image
Will Goldstone

Will Goldstone is a longstanding member of the Unity community and works for Unity Technologies as a Technical Support Associate, handling educational content and developer support. With an MA in Creative Education, and many years experience as a lecturer in higher education, Will wrote the first ever Unity book, the original Unity Game Development Essentials, and also created the first ever video tutorials for the package. Through his sites http://www.unity3dstudent.com and http://learnunity3d.com Will helps to introduce new users to the growing community of developers discovering Unity every day.
Read more about Will Goldstone

Right arrow

Creating the menu — approach 2


As we already have a working menu, rather than removing it from our scene, we will temporarily disable the objects that make it up. By doing this, you can choose which menu you prefer later and reinstate as necessary.

Disabling Game Objects

One at a time, select the PlayBtn, the InstructionsBtn, and the QuitBtn in the Hierarchy, and deactivate them by doing the following:

  • In the Inspector, deselect the checkbox to the left of the name of the object

  • Ensure that this has turned the text of the object to light gray in the Hierarchy and that the element itself has disappeared from the Game view preview

Writing an OnGUI() script for a simple menu

Now, create a new empty object by going to GameObject | Create Empty. This makes a new object in the Hierarchy called GameObject with only a Transform component attached. This will be the holder object for our GUI 2.0 menu. This is because the script we are going to write will need to be attached as a component in...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Unity Game Development Essentials
Published in: Oct 2009Publisher: PacktISBN-13: 9781847198181

Author (1)

author image
Will Goldstone

Will Goldstone is a longstanding member of the Unity community and works for Unity Technologies as a Technical Support Associate, handling educational content and developer support. With an MA in Creative Education, and many years experience as a lecturer in higher education, Will wrote the first ever Unity book, the original Unity Game Development Essentials, and also created the first ever video tutorials for the package. Through his sites http://www.unity3dstudent.com and http://learnunity3d.com Will helps to introduce new users to the growing community of developers discovering Unity every day.
Read more about Will Goldstone