How to make enter name in new UI?
![[IMG]]()
In old gui it was like:
Name.js
static var PlayerName : String = "Player";
function OnGUI (){
PlayerName = GUI.TextArea (Rect(Screen.width / 2,10,100,27), PlayerName, 10);
if (GUI.Button (Rect (Screen.width / 2,45,100,25), "Login")) {
Application.LoadLevel("Test");
}
}
And in next scene:
NameLoad.js
function OnGUI ()
{...
Enter Name in new UI
![[IMG]](http://forum.unity3d.com/data/attachments/101/101993-f61028ea1f3f21ad11c17015d5eafe18.jpg)
In old gui it was like:
Name.js
static var PlayerName : String = "Player";
function OnGUI (){
PlayerName = GUI.TextArea (Rect(Screen.width / 2,10,100,27), PlayerName, 10);
if (GUI.Button (Rect (Screen.width / 2,45,100,25), "Login")) {
Application.LoadLevel("Test");
}
}
And in next scene:
NameLoad.js
function OnGUI ()
{...
Enter Name in new UI