DeleteMyPlayerPrefs

From Unify Community Wiki
Revision as of 00:41, 20 January 2013 by Bunny83 (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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