- Home /
Why PlayPrefs won't work for me?
Hey there!
I have no idea what my editor won't recognize the "SetInt" or "GetInt" for PlayPrefs. Look at the screenshot. What should I do? My unity version is 5.3.0f4
thank you
gjf's answer is correct. You're trying to access Unity's PlayerPrefs, but you have a class named PlayerPrefs already, which does not contain a 'SetInt' definition. Either specify the namespace, UnityEngine.PlayerPrefs or better yet, rename your class to avoid confusion.
Answer by gjf · Apr 20, 2016 at 08:25 PM
you should NOT name your class the same as something unity uses... it's going to cause you problems - like this ;)
if you must, then use the full class name for the unity version. UnityEngine.PlayerPrefs....
Your answer
Follow this Question
Related Questions
Can I get documentation snippets in addition to intellisense? 2 Answers
What's the difference between Monodevelop with Unity, and the one I downloaded? 2 Answers
Unity3 Monodevelop Autocompletion 2 Answers
Monodevelop problems with curly braces 1 Answer
MonoDevelop doesn't open script and keeps restarting? 0 Answers