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.
Your answer
![](https://koobas.hobune.stream/wayback/20220612052810im_/https://answers.unity.com/themes/thub/images/avi.jpg)