|
My gosh, I just found that PlayerPrefs.Save() isn't saving my state immediately (on iOS) so that if I call Save() and the game subsequently crashes, the state hasn't been stored on disk (flash). This is scary. The documentation says it writes to disk immediately, but I'm not seeing this behavior. In my case, for example, the user has purchased a theme, and if the game crashes and is relaunched, the game thinks the user hasn't bought it yet! Yikes. I was relying on PlayerPref to RELIABLY save all sorts of player state. I would hate to have to write my own storage manager. I'm using Unity 3.4.2. I don't want to upgrade to 3.5 as I know it will be painful and want to ship version 1.0 of my game first. Has anyone seen this scenario? Thanks in advance.
(comments are locked)
|

For what it's worth, I don't know that I've ever observed that behavior. You might see if you can put together a very simple test project that reproduces the issue; it may confirm that you're right (in which case you should submit a bug report), or might help you to troubleshoot your current woes.
@rutter Thanks, it should be easy to create a new project that simply saves state and then crashes to confirm. Cheers.