38 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			38 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
| 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}");
 | |
|             }
 | |
|         }
 | |
|     }
 | |
| } |