We want the player to be able to change his nickname. We can use an Input Field
widget to create a nickname box.
Before we continue, let's prepare a container box for our input field:
Select our
UI Root
|Options
GameObject.Create a new child, empty GameObject with Alt + Shift + N.
Rename this new empty GameObject to
Nickname
.
Now that we have our Nickname
holder GameObject, we can add (and configure) the UISprite
component to it to create the nickname box background:
Select our UI Root
| Options
| Nickname
GameObject:
Click on the Add Component button in the Inspector view.
Type in
sprite
with your keyboard.Select NGUI Sprite with your keyboard arrows and hit Enter.
We now have the UISprite
component on our Nickname
. Configure it as follows:
Select Wooden Atlas for the Atlas parameter.
Change Sprite to Highlight – Thin.
Change the sprite Type parameter to Sliced.
Change Color Tint to
{R: 180, G: 125, B: 50, A: 255}
.Set Size to 520 x 280.
Set its Transform position to
{0, 85, 0}
.
Ok, we...