Quantcast
Channel: Questions in topic: "playerprefs"
Viewing all articles
Browse latest Browse all 1333

Does PlayerPrefs.Save() guarantee atomicity

$
0
0
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.

Viewing all articles
Browse latest Browse all 1333

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>