Keep losing my saves in Player Prefs

Discussion and help for Easy Save 3
Post Reply
teq
Posts: 18
Joined: Mon Jul 16, 2018 12:23 pm

Keep losing my saves in Player Prefs

Post by teq »

Hi there! I have many users of my app and sometimes they complain about losing app's settings state. I use ES3 with Player Prefs, AES enc, no compression. I use ES only for saving strings like "theme" -> "dark". Nothing more.
I just create ES3File with ES3Settings

Code: Select all

_userES3Settings = new ES3Settings(ES3.EncryptionType.AES, ES3_ENCRYPTION_PASSWORD)
                                                           {
                                                               location = ES3.Location.PlayerPrefs
                                                           }
es3DefaultFile = new ES3File(UserES3Settings);
and then

Code: Select all

es3DefaultFile.Save<T>(settingName, value); 
and

Code: Select all

es3DefaultFile.Sync(UserES3Settings);
In this article stated that Plaer Prefs "can be deleted by accident since they’re saved outside of the project and managed by your OS".
What do you recommend for better data integrity?
User avatar
Joel
Moodkie Staff
Posts: 4846
Joined: Wed Nov 07, 2012 10:32 pm

Re: Keep losing my saves in Player Prefs

Post by Joel »

Hi there,

Is there any reason you’re using PlayerPrefs rather than the default option of File?

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
teq
Posts: 18
Joined: Mon Jul 16, 2018 12:23 pm

Re: Keep losing my saves in Player Prefs

Post by teq »

Joel wrote: Tue Nov 29, 2022 6:50 pm Hi there,

Is there any reason you’re using PlayerPrefs rather than the default option of File?

All the best,
Joel
Yes, i tried File few years ago and also faced with the same issue.
User avatar
Joel
Moodkie Staff
Posts: 4846
Joined: Wed Nov 07, 2012 10:32 pm

Re: Keep losing my saves in Player Prefs

Post by Joel »

As we’ve had no other reports of people losing their data I’m afraid it’s difficult for me to comment on what’s happening.

The only situations I know of where data is removed without the player deleting it themselves is if the bundle identifier of the app changes between updates, or if the app is uninstalled.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Post Reply