- Home /
Is PlayerPrefs.Save deprecated?
I've started to use PlayerPrefs for our game, and while it works great, it seems that one of the commands given in the Scripting Reference Guide is no longer valid.
When I put
PlayerPrefs.Save;
or
PlayerPrefs.Save();
in a script, I get the following error in the console:
BCE0019: 'Save' is not a member of 'UnityEngine.PlayerPrefs'.
Am I doing something wrong, or has PlayerPrefs.Save been deprecated? If so, it should probably be removed from the reference...
Answer by Eric5h5 · Aug 15, 2011 at 11:15 PM
You must always use parentheses when calling a function, so PlayerPrefs.Save will never work. PlayerPrefs.Save() can't possibly be deprecated, since it wasn't added until Unity 3.4. ;) I assume you're using an older version. You can't use Save() unless you upgrade.
$$anonymous$$y $$anonymous$$onoDevelop directs people to latest docs online rather than the ones shipped with the release they have installed.
@Warwick Allison: yeah, that doesn't really make much sense.
Ah, that's why it wasn't working...I'm still on 3.3.
Thanks!
Your answer
Follow this Question
Related Questions
Check the size of PlayerPrefs from web player 2 Answers
PlayerPrefs save after quit? 2 Answers
loop through playerprefs ints and find specific one 2 Answers
Audio not playing on TriggerEnter (Pic Included) 3 Answers
UI Slider, Save Values and Change Them 0 Answers