- Home /
Saved files deleted after creating a new build
I have a level editor in my game, which saves the generated levels to a single file. It works as it should, but whenever I build to my phone (WP8, Nokia Lumia 620), the existing files are deleted. I also save options (currently just vibrate on/off and sound volume) and high scores in a similar way.
I'm saving the file as a .txt at Application.persistentDataPath.
I have checked and confirmed that Application.persistentDataPath remains the same after updating the game.
When I publish the app, and later decide to release an update, would the files then get removed as well? Or is it only when I'm building?
It depends on the platform. Android should keep your data for the application, while IOS does not. Are you sure the data isn't still there and it's not getting deleted some other way?
I have now tested it on Android - it saves the data. I have not yet tested on iOS.
I also posted this question on StackOverflow, where I was told it only happens because I'm building directly to the device, and it should not happen when updating a published app.
To anyone having the same issue: check out Windows Phone Power Tools. You can browse the App storage with this program, and manually backup the data. It's a bit iffy but it does the job.
Your answer
Follow this Question
Related Questions
Distribute terrain in zones 3 Answers
Why does Prefabs loose children and effects when instantiated on Windows Phone 8? 0 Answers
Windows phone 8 port failing during build 0 Answers
ETC1 compressed textures are not supported when publishing to WP8 0 Answers
Windows phone 8.1, no mouse input in VS simulator. 0 Answers