fix?
This commit is contained in:
74
Editor/CommonEditorActions.cs
Normal file → Executable file
74
Editor/CommonEditorActions.cs
Normal file → Executable file
@@ -1,38 +1,38 @@
|
||||
using System.IO;
|
||||
using RebootKitEditor.Build;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace RebootKitEditor {
|
||||
static class CommonEditorActions {
|
||||
[MenuItem(REditorConsts.k_EditorMenu + "Bump minor version", false, 0)]
|
||||
static void BumpMinorVersion() {
|
||||
if (VersionUpdater.IncrementMinor()) {
|
||||
Debug.Log("Bumped minor version.");
|
||||
} else {
|
||||
Debug.LogError("Failed to bump minor version.");
|
||||
}
|
||||
}
|
||||
|
||||
[MenuItem(REditorConsts.k_EditorMenu + "Open Persistent Data Folder", false, 100)]
|
||||
static void OpenPersistentDataFolder() {
|
||||
string path = Application.persistentDataPath;
|
||||
if (Directory.Exists(path)) {
|
||||
EditorUtility.RevealInFinder(path);
|
||||
} else {
|
||||
Debug.LogError($"Persistent data folder does not exist: {path}");
|
||||
}
|
||||
}
|
||||
|
||||
[MenuItem(REditorConsts.k_EditorMenu + "Remove Persistent Data Folder", false, 1000)]
|
||||
static void RemovePersistentDataFolder() {
|
||||
string path = Application.persistentDataPath;
|
||||
if (Directory.Exists(path)) {
|
||||
Directory.Delete(path, true);
|
||||
Debug.Log($"Removed persistent data folder: {path}");
|
||||
} else {
|
||||
Debug.LogError($"Persistent data folder does not exist: {path}");
|
||||
}
|
||||
}
|
||||
}
|
||||
using System.IO;
|
||||
using RebootKitEditor.Build;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace RebootKitEditor {
|
||||
static class CommonEditorActions {
|
||||
[MenuItem(REditorConsts.k_EditorMenu + "Bump minor version", false, 0)]
|
||||
static void BumpMinorVersion() {
|
||||
if (VersionUpdater.IncrementMinor()) {
|
||||
Debug.Log("Bumped minor version.");
|
||||
} else {
|
||||
Debug.LogError("Failed to bump minor version.");
|
||||
}
|
||||
}
|
||||
|
||||
[MenuItem(REditorConsts.k_EditorMenu + "Open Persistent Data Folder", false, 100)]
|
||||
static void OpenPersistentDataFolder() {
|
||||
string path = Application.persistentDataPath;
|
||||
if (Directory.Exists(path)) {
|
||||
EditorUtility.RevealInFinder(path);
|
||||
} else {
|
||||
Debug.LogError($"Persistent data folder does not exist: {path}");
|
||||
}
|
||||
}
|
||||
|
||||
[MenuItem(REditorConsts.k_EditorMenu + "Remove Persistent Data Folder", false, 1000)]
|
||||
static void RemovePersistentDataFolder() {
|
||||
string path = Application.persistentDataPath;
|
||||
if (Directory.Exists(path)) {
|
||||
Directory.Delete(path, true);
|
||||
Debug.Log($"Removed persistent data folder: {path}");
|
||||
} else {
|
||||
Debug.LogError($"Persistent data folder does not exist: {path}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user