Skip to content

Commit

Permalink
merge menu items
Browse files Browse the repository at this point in the history
  • Loading branch information
imurashka committed Oct 6, 2024
1 parent cca4d8f commit 80ba616
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
9 changes: 8 additions & 1 deletion .BinaryPrefs/Assets/Editor/MenuItems.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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());
}
}
}
3 changes: 0 additions & 3 deletions .BinaryPrefs/Assets/Editor/MenuItemsTools.cs.meta

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace Appegy.Storage.Example
{
public static class MenuItemsTools
public static class ReserializationUtilities
{
private static readonly string[] _mutableFolders =
{
Expand All @@ -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<string> assets)
public static void ReserializeAssets(IEnumerable<string> assets)
{
var regularAssets = new HashSet<string>();
var textAssets = new HashSet<string>();
Expand Down
3 changes: 3 additions & 0 deletions .BinaryPrefs/Assets/Editor/ReserializationUtilities.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 80ba616

Please sign in to comment.