PlayerPrefs don't reset when creating a new build of the game

My endless runner uses Player Prefs and even though I use EditClear All PlayerPrefs, I still get old PlayerPrefs after making a new build of the game.

The weird thing is that EditClear All PlayerPrefs does work for PlayerPrefs for when I play the game inside the editor.

1 Answer

1

The player prefs created when running a build are in a different location to those in the editor.

When you clear the editor it does not delete the (I assume Windows) build player prefs.
You need to do that manually from regedit, or delete in your program with a script on a button or something.

Windows is in registry at
HKCU\Software\ExampleCompanyName\ExampleProductName

Unity Editor is at
HKCU\Software\Unity\UnityEditor\ExampleCompanyName\ExampleProductName

All info here: https://docs.unity3d.com/ScriptReference/PlayerPrefs.html

Thx for the info. I went and deleted everything in the folder and it didn't help. After I made another build playerprefs didn't reset