Book Image

Getting Started with Unity

By : Patrick Felicia
Book Image

Getting Started with Unity

By: Patrick Felicia

Overview of this book

<p>Unity is a game development engine which is fully integrated with a complete set of intuitive tools and rapid workflows used to create interactive 3D content. Unity is best used for making great games that can deploy to numerous platforms.</p> <p>"Getting Started with Unity" guides you progressively through the necessary steps to create a survival game using Unity3D&rsquo;s built-in objects and components, JavaScript, animations with Mecanim, and some basic AI.</p> <p>In this book, you will be introduced to a wide range of the core features used for games developed with Unity3D, including the user interface and much more. Furthermore, you will also learn about essential aspects like transformations, scripting, navigation, and built-in controllers.</p> <p>Beginning with an introduction to the user interface, you will learn the necessary skills required to create a survival video game. Each section is a stepping-stone toward the completion of the final game. By the end of the book, you will have created an indoor level with enemies, AI, weapons, objects to collect, and all the logic to control the game.</p>
Table of Contents (13 chapters)
Getting Started with Unity
Credits
About the Author
About the Reviewer
www.packtpub.com
Preface
Index

Creating a menu system for your game


We have almost finished our game and level. For our game to be complete, we will need to create a splash screen and instructions, as well as screens to be displayed when the player has lost or succeeded. These screens will be created using scenes, and navigation between them will be implemented using buttons. To open a particular menu (for example, splash screen, instructions, or game over), we will load the corresponding scene. The background of the splash screen will include the maze created earlier and some animated zombies (idle). First let's create a prefab for the maze so that it can be reused.

Open the last scene, select the folder Assets | chapter6, create a new prefab (that is, select: Create | Prefab from the Project window), and rename it maze. Locate the object labeled maze in the Hierarchy window and drag-and-drop it on the prefab we have just created. This prefab will be accessible from any scene within our project, including the splash screen...