EditorPrefs.DeleteAll 删除全部

static function DeleteAll () : void

Description描述

Removes all keys and values from the preferences. Use with caution.

从偏好设定删除所有键和值。请谨慎使用。

EditorPrefs.DeleteAll 删除全部

Clears all editor prefs keys.
清除所有编辑器偏好设定键。

// Clear all the editor prefs keys.
//清除所有编辑器偏好设定键。
// Warning: this will also remove editor preferences as the opened projects, etc
//警告:这也将删除编辑器打开的项目的偏好设定,等
class ClearEditorPrefs extends ScriptableObject {
	@MenuItem ("Examples/Clear all Editor Preferences")
	static function DoDeselect() {
		if(EditorUtility.DisplayDialog("Delete all editor preferences?",
			"Are you sure you want to delete all the editor preferences?,this action cannot be undone.",
			"Yes","No"))
		EditorPrefs.DeleteAll();
	}
}
Page last updated: 2011-7-11