Posts

Showing posts from 2015

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 Versi...