unity3d GUI textfield problem

I created a text field but I can’t write in it? :frowning: I can select the typing area but I can’t write anything!? Why can’t I?

Here’s the lines:

public string Username;

void OnGUI(){
    PhotonNetwork.player.name = GUI.TextField(new Rect(50,0,100,30), Username);
}

You are not using TextField properly. Do:

void OnGUI(){
    Username = GUI.TextField(new Rect(50,0,100,30), Username);
    PhotonNetwork.player.name = Username;
}

You don’t have an submit logic here, but this will get you up and running with typing text.