I am using PlayerPrefs.setInt() and getInt() in my application however when I exit the app and go back into it the preferences do not stay. Any ideas?
There is a thread somewhere on the forum that explains all this. It only started working with the iphone 1.0.1 update.
Hope this helps… it works for me:
function Awake() {
// Used to reset player prefs back to zero
PlayerPrefs.SetInt("High score", 0);
// This gets the the High score and puts it in a variable
highScore = PlayerPrefs.GetInt("High score");
Obviously, you wouldn’t actually use these two lines in succession like this as otherwise your high score would always be zero. I comment the line out to set to zero unless I want to reset.
can i set the prefs in OnApplicationQuit()?
yes, that works in 1.0.1 as well.