Book Image

NGUI for Unity

By : Charles Bernardoff
Book Image

NGUI for Unity

By: Charles Bernardoff

Overview of this book

Table of Contents (14 chapters)

Preparing the Game scene

We will need to have our GameManager and Notification GameObjects as prefabs for this chapter.

From our Menu scene, create these two prefabs by dragging them separately in the folder of your choice in the Project view.

Now, let's create a new scene with Ctrl + N and perform the following steps:

  1. Press Ctrl + S to save it, and enter Game as the scene's name.

  2. In our new scene, delete the Main Camera GameObject. We won't need it for this scene.

  3. Drag our GameManager prefab from the Project view into the Hierarchy view.

  4. Open the UI Tool wizard by navigating to NGUI | Create a New UI.

  5. Add a new Layer named Game.

  6. Select this Game layer for the Layer parameter in our UI Tool wizard.

  7. Click on the Create Your UI button.

  8. Select our new Camera GameObject, and set its Background Color to R: 0, G: 0, B: 0, and A: 255.


    Make sure your Color selector popup is in the RGBA values and not HSVA. This can be done by using the button next to the Sliders option when you click on a Color parameter...