This commit is contained in:
2025-04-14 23:22:38 +02:00
parent 72b8a37345
commit 1e190fe94b
166 changed files with 2989 additions and 687 deletions

View File

@@ -0,0 +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}");
}
}
}
}