user interface - Unity GUILayout.TextField Refresh -


I have a GUILayout.Textfield that I use to enter a new player name. However, the text in the text file is never refreshed, although the price console varies according to log. How to get a text field to refresh any thoughts?

  private bool createProfile = false; Private string player name = "player name"; Zero OGUI () {// to enter the display window player name if (creator) {Rect BuildProfileWindow = New Rect (Screen with / 2 - 100, screen.height / 2 - 35, 200, 70); CreateProfileWindow = GUIlayout.Window (2, createProfileWindow, CreateUserProfile, "new player"); }} Zero CreateUserProfile (int windowID) {// popup window to apply the player name. Add 'Create' button GUILayout.BeginVertical (); GUILayout.BeginHorizontal (); GUILayout.FlexibleSpace (); Player name = GELAout Textfield (player name, 50); GUILayout.FlexibleSpace (); GUILayout.EndHorizontal (); GUILayout.BeginHorizontal (); GUILayout.FlexibleSpace (); If (GUILayout.Button ("create") {PlayerPrefs.SetString ("PlayerName", playerName); PlayerPrefs.Save (); CreateProfile = false; } GUILAYout.FlexibleSpace (); GUILayout.EndHorizontal (); GUILayout.EndVertical (); }  


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -