From 80ba6169bc387a4dc7986a038e3702cd7c076d24 Mon Sep 17 00:00:00 2001 From: Ivan Murashka Date: Sun, 6 Oct 2024 14:14:18 +0200 Subject: [PATCH] merge menu items --- .BinaryPrefs/Assets/Editor/MenuItems.cs | 9 ++++++++- .BinaryPrefs/Assets/Editor/MenuItemsTools.cs.meta | 3 --- .../{MenuItemsTools.cs => ReserializationUtilities.cs} | 10 ++-------- .../Assets/Editor/ReserializationUtilities.cs.meta | 3 +++ 4 files changed, 13 insertions(+), 12 deletions(-) delete mode 100644 .BinaryPrefs/Assets/Editor/MenuItemsTools.cs.meta rename .BinaryPrefs/Assets/Editor/{MenuItemsTools.cs => ReserializationUtilities.cs} (86%) create mode 100644 .BinaryPrefs/Assets/Editor/ReserializationUtilities.cs.meta diff --git a/.BinaryPrefs/Assets/Editor/MenuItems.cs b/.BinaryPrefs/Assets/Editor/MenuItems.cs index f0814e5..536f916 100644 --- a/.BinaryPrefs/Assets/Editor/MenuItems.cs +++ b/.BinaryPrefs/Assets/Editor/MenuItems.cs @@ -7,7 +7,7 @@ namespace Appegy.Storage.Example { public static class MenuItems { - public const string RootMenuItem = "Appegy/Persistent Folder/"; + public const string RootMenuItem = "Appegy/"; [MenuItem(RootMenuItem + "Reveal in Explorer")] public static void OpenPersistentFolder() @@ -32,5 +32,12 @@ public static void ClearPersistentFolder() Directory.Delete(cacheFolder, true); } } + + [MenuItem(RootMenuItem + "Reserialize Project", priority = 100)] + [MenuItem("Assets/Reserialize All", false, 40)] + public static void ReserializeAll() + { + ReserializationUtilities.ReserializeAssets(AssetDatabase.GetAllAssetPaths()); + } } } \ No newline at end of file diff --git a/.BinaryPrefs/Assets/Editor/MenuItemsTools.cs.meta b/.BinaryPrefs/Assets/Editor/MenuItemsTools.cs.meta deleted file mode 100644 index fbd2c9e..0000000 --- a/.BinaryPrefs/Assets/Editor/MenuItemsTools.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: f6f71393cfab485999e4b3eb499b0f04 -timeCreated: 1728211822 \ No newline at end of file diff --git a/.BinaryPrefs/Assets/Editor/MenuItemsTools.cs b/.BinaryPrefs/Assets/Editor/ReserializationUtilities.cs similarity index 86% rename from .BinaryPrefs/Assets/Editor/MenuItemsTools.cs rename to .BinaryPrefs/Assets/Editor/ReserializationUtilities.cs index b053836..f4879e4 100644 --- a/.BinaryPrefs/Assets/Editor/MenuItemsTools.cs +++ b/.BinaryPrefs/Assets/Editor/ReserializationUtilities.cs @@ -8,7 +8,7 @@ namespace Appegy.Storage.Example { - public static class MenuItemsTools + public static class ReserializationUtilities { private static readonly string[] _mutableFolders = { @@ -26,13 +26,7 @@ public static class MenuItemsTools typeof(AssemblyDefinitionReferenceAsset) }; - [MenuItem("Assets/Reserialize All", false, 40)] - public static void ReserializeAll() - { - ReserializeAssets(AssetDatabase.GetAllAssetPaths()); - } - - private static void ReserializeAssets(IEnumerable assets) + public static void ReserializeAssets(IEnumerable assets) { var regularAssets = new HashSet(); var textAssets = new HashSet(); diff --git a/.BinaryPrefs/Assets/Editor/ReserializationUtilities.cs.meta b/.BinaryPrefs/Assets/Editor/ReserializationUtilities.cs.meta new file mode 100644 index 0000000..6d2ee50 --- /dev/null +++ b/.BinaryPrefs/Assets/Editor/ReserializationUtilities.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 62870d4591da4b889f166eef5d05a2b4 +timeCreated: 1728216605 \ No newline at end of file