- Home /
 
 
               Question by 
               gfd13qdeq · Jan 23, 2015 at 07:05 AM · 
                inputfield  
              
 
              Text.text does not update
Hallo my problem is very simpel i use the event system to get a string from the player, to update the user name after that i want to clean the InputField Text Scipt but it does not update can any explain why? private Text text; private InputField inputField;
 void Start () {
     text = GetComponentInChildren<Text> ();
     inputField = GetComponent<InputField> ();
     text.text = PlayerInfo.PlayerName;
     inputField.onSubmit.AddListener ((value) => UpdatePlayerName (value));
     }
     
 private void UpdatePlayerName(string value){
     PlayerInfo.PlayerName = value;
     text.text = PlayerInfo.PlayerName;
 }
 
               it will update in the Start function but not in the UpdatePlayerName, but the player Name is stil getting update
               Comment
              
 
               
              Rather than resurrecting a question from over a year ago you are far more likely to find a solution to your problem by posting your own question...
Your answer