Old Save Data mysteriously appearing on Build
Old Save Data mysteriously appearing on Build
So i constantly clear my saved data while working, but whenever i build i seem to have the same 3 save data slots in my system showing up, from months ago. Its not present anyone in the editor or play mode that i can find, but whenever i build it shows up in there. Any clue where i might find this and delete it?
Re: Old Save Data mysteriously appearing on Build
Hi,
Are you using PlayerPrefsSavedGameDataStorer?
Unity uses entirely different sets of PlayerPrefs data for the Unity editor and for builds. If you want to clear the data in your build, you can call PlayerPrefs.DeleteAll() to clear all PlayerPrefs, or PixelCrushers.SaveSystem.DeleteSavedGameInSlot(#). For # you can loop through all the save slot numbers that your game uses. If there's no saved game in that slot #, it will ignore it.
Are you using PlayerPrefsSavedGameDataStorer?
Unity uses entirely different sets of PlayerPrefs data for the Unity editor and for builds. If you want to clear the data in your build, you can call PlayerPrefs.DeleteAll() to clear all PlayerPrefs, or PixelCrushers.SaveSystem.DeleteSavedGameInSlot(#). For # you can loop through all the save slot numbers that your game uses. If there's no saved game in that slot #, it will ignore it.
Re: Old Save Data mysteriously appearing on Build
I am using the Player Prefs Storer, yeah. Are these saves not located somewhere in the project folder? They only show up in the data on build.
Is there a way to prevent building with these mysterious old saves? I dont wanna delete them at runtime, i feel like thats asking for trouble.
Is there a way to prevent building with these mysterious old saves? I dont wanna delete them at runtime, i feel like thats asking for trouble.
Re: Old Save Data mysteriously appearing on Build
This Unity manual page explains where PlayerPrefs are located on each platform.
For example, if you're using Windows, Unity stores PlayerPrefs data in the Windows Registry. When you make a build, Unity isn't making the build with that PlayerPrefs data. The PlayerPrefs data is separate, in the Windows Registry. When you run the build, PlayerPrefs looks in the Windows Registry and sees data there.
For example, if you're using Windows, Unity stores PlayerPrefs data in the Windows Registry. When you make a build, Unity isn't making the build with that PlayerPrefs data. The PlayerPrefs data is separate, in the Windows Registry. When you run the build, PlayerPrefs looks in the Windows Registry and sees data there.