Storing playerprefs as string in inputfield.text
Hi everyone, is there a way to pass a given playerpref as a string so that it displays on an input field text?
 public InputField textbox;
 public string score;
 
 void awake() {
 textbox = GameObject.Find ("textbox1").GetComponent<InputField> ();
 }
 
 void update(){
 PlayerPrefs.SetString("Score", score);
 }
 
 public void scorePoints(){
 score+1;
 }
 
 textbox.text = score.ToString();
 
               Comment
              
 
               
               
               Best Answer 
              
 
              Answer by ashtopher · Mar 05, 2018 at 10:52 AM
Got the answer!
 textbox.text = PlayerPrefs.GetString("Score");
Your answer
 
 
              koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                