O'Reilly logo

Unity iOS Essentials by Robert Wiebe

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Task: create a GUI to get the players' names

This task depends on the load and save functions performed on the players' preferences task. We must complete that task successfully prior to beginning this task.

In our game, we are going to allow different players to sign in, and we are going to maintain a different set of options for each player.

To accomplish this, we are going to ask the players to enter their name when the game is launched, and we are going to create a separate options plist file for different players.

Add the player name variable to Globals.js

In order to do this, the very first thing we need is a global location to save the players' names. To do that, the following steps need to be performed:

  1. Open the Chapter 6 Unity Project folder. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required