If i do this:
PlayerPrefs.SetString("X", "some string one");
PlayerPrefs.SetString("Y", "some string two");
PlayerPrefs.Save();
What kind of atomicity guarantees do I have? That is, assuming that my device runs out of power while any of these lines are executing, what will happen to my PlayerPrefs? Specifically:
1. Is there any risk that either string will be partially written?
2. Is there any risk that one string will be written but not the other?
I would very much like it if PlayerPrefs did guarantee some sort atomicity. I would hate to have to start including hashes and things in order to ensure that my data hasn't become corrupted.
↧