hellbound/Assets/Scripts/Core/Editor/ToolsMenu.cs

20 lines
491 B
C#

using System.IO;
using UnityEditor;
using UnityEngine;
public class ToolsMenu : Editor
{
[MenuItem("Tools/Clear save #C")]
private static void Clear()
{
PlayerPrefs.DeleteAll();
Log.Debug("ToolsMenu.Clear: Player prefs are cleared.");
if (File.Exists(GameData.DefaultDataFile))
{
File.Delete(GameData.DefaultDataFile);
Log.Debug("ToolsMenu.Clear: Save file was deleted.");
}
}
}