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:

Windows Registry Editor Version 5.00

[-HKEY_CURRENT_USER\Software\Shadow Moses Developments Ltd\Subnet-POC]

Simple, yet effective. Happy coding!

Popular posts from this blog

Handling uploads with MVC4, JQuery, Plupload and CKEditor

Getting Unity 3D working with Git on Windows

Generating a self-signed SSL certificate for my QNAP NAS