Skip to content

Instantly share code, notes, and snippets.

@romainPechot
Created October 10, 2015 10:52
Show Gist options
  • Save romainPechot/b87016f6cedfdae70ae5 to your computer and use it in GitHub Desktop.
Save romainPechot/b87016f6cedfdae70ae5 to your computer and use it in GitHub Desktop.
Quick Unity Editor Tool for cleaning ALL the PlayerPrefs
using UnityEngine;
using UnityEditor;
public class ClearPlayerPrefs
{
[MenuItem("Tools/Clear PlayerPrefs")]
private static void ClearAllPlayerPrefs()
{
if(EditorUtility.DisplayDialog("Clear ALL PlayerPrefs", "Do you really want to clear ALL the PlayerPrefs\nof this project ?\n\nYou cannot undo this action.", "Yep", "Nah"))
{
PlayerPrefs.DeleteAll();
}
}// ClearAllPlayerPrefs()
}// ClearPlayerPrefs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment