I was able to store my first data 10 minutes ago and I’m glad I solved this “frightening” thing. For me it was a scary thing.
Now I read about the “save” command: Writes all modified preferences to disk.
Ummm… What does that mean exactly?
- Does it save all stored values in one?
- Which way I call up that command?
- Is it watching all values permanently if they change?
I think, since PlayerPrefs is in itself a class, Save() will save all PlayerPrefs, regardless of script. That being said, I Save() at convenient points in various scripts. By convenient I mean, where not much action is happening on the engine.
-
yes, not 100%, but it would make sense that one PlayerPrefs.Save(); will save any PlayerPrefs value in the project.
-
ex. HiScore = PlayerPrefs.GetFloat(“hiScore”);
-
no. PlayerPrefs is not observing anything. You set a value, save a value and retrieve a value. That’s it.