Cant override GUI.textfield

Update: so I changed the default of what is in the Gui.Textfield and now I can sort of type in there, but it doesnt override the default text that I put in there “Enter Name Here”. and it saves my character name as "Enter Name here " :frowning:

Hello Unity,

For some reason, I cant type into a GUI.Textfield - I have never had a problem like this before. Would someone mind taking a look and seeing if they can see something I did that would not allow me to type? I have tried running as a standalone build and in the editor, neither let you type into the field.

This is a window that opens and allows you to put in character information for creating a character, then it is supposed to save that into binary(which I havent gotten working either).

	//Save Character Window Function
	void SaveCharDataWindow(int windowID)
	{
		PlayerDataClass myChar = new PlayerDataClass();
		GUI.Label(new Rect(10,10,150, 25), "Enter Character Name");		
		myChar.playerName = GUI.TextField(new Rect(5,30, 150, 25), "Enter Name Here");
		
		//Set Default values for the new character
		myChar.playerXP = 0;
		myChar.playerLevel = 1;
		
		if(GUI.Button(new Rect(offset, 150, 450, 50), "Save"))
		{
			MyCharacters.Add(myChar);
			openCreateCharacterScreen = false;
			numberOfCharacters++;
			//Save this data to playerprefs file:
			var b = new BinaryFormatter();
			var m = new MemoryStream();
			//save info
			b.Serialize(m, MyCharacters);
			PlayerPrefs.SetString("MyCharacters",Convert.ToBase64String(m.GetBuffer()));
		}				
	

	}

Gah it never fails - I ask a question on here and figure it out right after I finish typing it lol.

The solution for those interested was I needed (apparently) a temporary variable to store my player name in, I couldnt assign the name in the same line as its being typed.

So I used this code:

		tempName = GUI.TextField(new Rect(5,30, 150, 25), tempName);
		myChar.playerName = tempName;