Page 1 of 1

Save files getting corrupted or deleted

Posted: Wed May 24, 2023 8:13 pm
by PopQuizHotShot
I'm making a mobile game, and the save files are either getting deleted or corrupted when the player exits the game during the scene transition.

In short, the flow for changing a scenes goes like this.
1. Enter trigger to change scenes
2. Data gets saved
3. New scene gets loaded
4. Expensive method call that triggers GC (from an unrelated script's awake() method)
5. Data gets loaded

I was wondering if you had any suggestions for investigating the issue. Thanks!


Extra details:
- ES3 version 3.5.3
- Using gzip compression with no encryption

Re: Save files getting corrupted or deleted

Posted: Thu May 25, 2023 8:09 am
by Joel
Hi there,

The only times I've seen anything like this happen is when the save location is set to Cache and you're not calling StoreCachedFile, or when using an event which isn't supported on your platform (for example, OnApplicationQuit doesn't work on mobile platforms).

I would also recommend updating Easy Save as you're not on the latest version.

Finally, I'd ensure that you're checking your log file/console for exceptions as this might also indicate the issue. It might also be worth putting Debug.Log calls immediately before your ES3.Save and ES3.Load calls to ensure that they're being called.

If this doesn't point you towards your issue, please could you create a new project with a simple scene which replicates it and private message it to me with instructions so I can see what is happening.

All the best,
Joel