Book Image

Learning NGUI for Unity

By : Charles Bernardoff (EURO)
Book Image

Learning NGUI for Unity

By: Charles Bernardoff (EURO)

Overview of this book

Table of Contents (17 chapters)
Learning NGUI for Unity
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Corrections


While testing, we stated the following issues:

  • Autorotation is enabled. We should remove it for our game.

  • Android's back button exits the game instead of enabling the game to pause.

  • The character does not move when objects are clicked on.

  • The elemental switch UI must be displayed differently than with a right-click.

We will correct them one by one. Let's start with the autorotation in the Player settings.

Autorotation

Open the Player settings window by navigating to Edit | Project Settings | Player, as shown in the following screenshot:

In the Inspector panel, enter your name and set the Default Orientation value to Landscape Left:

Good. The game will now be forced in the landscape left orientation. Let's correct the Android back button issue now.

Back button

The fact that the game exits when the back button is pressed comes from our main menu; the UI Root | Main | Buttons | Exit button is active with UIKeyBinding enabled.

Consequently, when you hit the Esc button, which is the back button...