ES3.DeleteFile() not deleting save data on Android
Posted: Mon Mar 08, 2021 3:28 am
I'm using Unity 2018.4
I want users to be able to erase their save file in the menu so that they can play again once they've beaten it. When I playtest this in the editor, the file is deleted as expected. However, when I build the game and run it on my device (Pixel 3), the save file does not get deleted.
Here's the line of code I'm using:
My game uses the same persistentDataPath everywhere in the code and there's always just one file to delete. This could be a bug, but is there something else I should be trying?
Thanks
EDIT: The Android OS is restoring the file as soon as it gets deleted. I will look through Google's docs to find a solution
I want users to be able to erase their save file in the menu so that they can play again once they've beaten it. When I playtest this in the editor, the file is deleted as expected. However, when I build the game and run it on my device (Pixel 3), the save file does not get deleted.
Here's the line of code I'm using:
Code: Select all
ES3.DeleteFile(ES3Settings.defaultSettings.path);
Thanks
EDIT: The Android OS is restoring the file as soon as it gets deleted. I will look through Google's docs to find a solution