Ok I have in scene1 a text field where the player can enter his name followed by an Enter button. Once player type name and push enter. It then opens scene2 with the players name on the top left.
I have a problem getting the name to show in scene 2.
Does anyone know an easy way to do this. Please Help
I used the following script but doesn’t tells me how to have the name display in scene2
var stringToEdit = “Player1”;
var userHasHitOk : boolean = false;
function OnGUI () {
if (userHasHitOk) { GUI.Label (Rect (10, 10, 100, 30), "Hello " + stringToEdit);
} else {
if (GUI.Button(Rect (0,Screen.height - 50,80, 40), “Enter”))
userHasHitOk = true;
}
GUI.Label (Rect (10, 10, 100, 30), “Enter Name:”);
stringToEdit = GUI.TextField (Rect (90, 10, 200, 25), stringToEdit, 40);
}