DeleteMyPlayerPrefs

From Unify Community Wiki
Jump to: navigation, search

Description

This script adds a menu item that, when selected, deletes the playerprefs within the editor. We found ourselves doing this a lot when working with various ways to unlock levels in our game as the player progressed..... so we made a simple editor script to make it much easier to delete them.


DeleteMyPlayerPrefs.cs

using UnityEditor;
using UnityEngine;
using System.Collections;
 
public class DeleteMyPlayerPrefs : MonoBehaviour {
 
	[MenuItem("Tools/DeleteMyPlayerPrefs")] 
	static void DeleteMyPlayerPrefs() { 
		PlayerPrefs.DeleteAll();
	} 
}
Personal tools
Namespaces

Variants
Actions
Navigation
Extras
Toolbox