Deleting All PlayerPrefs for your Unity3D Project on Windows
As a Unity3D developer you'll eventually find yourself wanting to delete the PlayerPrefs for a particular project on a regular basis. I've been recently using PlayerPrefs to store player settings like FOV, mouse sensitivity and acceleration, and I wanted to make sure that my code will run on a freshly installed machine as well as my development box.
If you click the link above, you'll see that all PlayerPrefs are stored in the registry - for a Windows machine at least. So, instead of writing some delete-later code to run PlayerPrefs.DeleteAll(), you can just create a simple registry file that you can click on whenever you want to clean up your machine. All you need to do is prefix the registry key of your project with a dash (-), and run the file.
Below is a sample file for Windows 8.1 - you'll need to alter the Registry Editor version at the top of the file if you're using any other version of Windows, but it should still work:
Simple, yet effective. Happy coding!
If you click the link above, you'll see that all PlayerPrefs are stored in the registry - for a Windows machine at least. So, instead of writing some delete-later code to run PlayerPrefs.DeleteAll(), you can just create a simple registry file that you can click on whenever you want to clean up your machine. All you need to do is prefix the registry key of your project with a dash (-), and run the file.
Below is a sample file for Windows 8.1 - you'll need to alter the Registry Editor version at the top of the file if you're using any other version of Windows, but it should still work:
Windows Registry Editor Version 5.00 [-HKEY_CURRENT_USER\Software\Shadow Moses Developments Ltd\Subnet-POC]
Simple, yet effective. Happy coding!