Hello Unityrs,
I build a chat line.. and to log in I fill up a textArea saving the value (the username) into a variable, let's call it playerNameInput.
For example: playerNameInput = GUI.TextArea (Rect (horzOffset+30, 80, 300 , 20), playerNameInput);
Just after that statement I call:
PlayerPrefs.SetString("playerName", playerNameInput); //Setting the player's name.
But somehow, when I display the content of "playerName" field in the chat room, I get always the previous one and never the current. So, I wonder when the PlayerPrefs are saved?! and How can I update PlayerPrefs at runtime.
Many thanks. Giancarlo