Question by
Smitlord · Dec 16, 2015 at 12:52 AM ·
unity 5javascriptplayerprefsconditional
how do i put a PlayerPrefs into a conditional statement
i just got bored in videogame design sense i have done all of the required stuff i feel like overachieving by making a high score but i cant keep it at a number until a higher one is made and i cant get the PlayerPrefs into conditional statements
Comment
Answer by Firedan1176 · Dec 16, 2015 at 05:07 AM
There are methods to get data types from player prefs so you should be able to do get your data into a variable, or simply use PlayerPrefs.GetString ("highscore");
, which could be set as a string. Then you could compare that.
Keep in mind GetFloat, GetInt, etc are available. Check out the documentation.