This commit is contained in:
2025-05-26 17:04:33 +02:00
parent f0536f4129
commit 6bda371baa
303 changed files with 1361 additions and 1372 deletions

74
Editor/CommonEditorActions.cs Normal file → Executable file
View 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}");
}
}
}
}