- Home /
Question by
yapshuter63 · Jan 12, 2014 at 04:03 PM ·
playerprefsstring
Detect if PlayerPrefs string exists
What I want to do is detect if a player preferences string exists. After checking the unity docs, it says that "PlayerPrefs.GetString will return default value if the string does not exist." After trying this in my code, it does not seem to be returning "defaultValue". What should I do?
Comment
Answer by Lukas H · Jan 12, 2014 at 08:53 PM
Check the method PlayerPrefs.HasKey http://docs.unity3d.com/Documentation/ScriptReference/PlayerPrefs.HasKey.html
Your answer
Follow this Question
Related Questions
PlayerPrefs from One App to Another. 1 Answer
Store individual positions of GameObjects in a string 3 Answers
Using Player Prefs 0 Answers
If Statements with PlayerPrefs 1 Answer
Display PlayerPrefs.GetInt? 1 Answer