From e763281966d23f9edc8863b6b3cedb75d44cd022 Mon Sep 17 00:00:00 2001 From: bd_ Date: Thu, 11 May 2023 19:42:31 +0900 Subject: [PATCH] ui: group menu items [NEEDS DOCS] --- Packages/nadena.dev.modular-avatar/Editor/AvatarProcessor.cs | 4 ++-- Packages/nadena.dev.modular-avatar/Editor/EasySetupOutfit.cs | 4 ++-- .../nadena.dev.modular-avatar/Editor/Menu/MenuExtractor.cs | 4 ++-- ProjectSettings/ProjectSettings.asset | 5 ++++- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Packages/nadena.dev.modular-avatar/Editor/AvatarProcessor.cs b/Packages/nadena.dev.modular-avatar/Editor/AvatarProcessor.cs index 4bd45a29..d2356c23 100644 --- a/Packages/nadena.dev.modular-avatar/Editor/AvatarProcessor.cs +++ b/Packages/nadena.dev.modular-avatar/Editor/AvatarProcessor.cs @@ -66,13 +66,13 @@ namespace nadena.dev.modular_avatar.core.editor EditorApplication.playModeStateChanged += OnPlayModeStateChanged; } - [MenuItem("GameObject/[ModularAvatar] Manual bake avatar", true, 49)] + [MenuItem("GameObject/ModularAvatar/Manual bake avatar", true, 100)] static bool ValidateApplyToCurrentAvatarGameobject() { return ValidateApplyToCurrentAvatar(); } - [MenuItem("GameObject/[ModularAvatar] Manual bake avatar", false, 49)] + [MenuItem("GameObject/ModularAvatar/Manual bake avatar", false, 100)] static void ApplyToCurrentAvatarGameobject() { ApplyToCurrentAvatar(); diff --git a/Packages/nadena.dev.modular-avatar/Editor/EasySetupOutfit.cs b/Packages/nadena.dev.modular-avatar/Editor/EasySetupOutfit.cs index 62296d10..a179fe46 100644 --- a/Packages/nadena.dev.modular-avatar/Editor/EasySetupOutfit.cs +++ b/Packages/nadena.dev.modular-avatar/Editor/EasySetupOutfit.cs @@ -16,7 +16,7 @@ namespace nadena.dev.modular_avatar.core.editor private const int PRIORITY = 49; - [MenuItem("GameObject/[ModularAvatar] Setup Outfit", false, PRIORITY)] + [MenuItem("GameObject/ModularAvatar/Setup Outfit", false, PRIORITY)] static void SetupOutfit(MenuCommand cmd) { if (!FindBones(cmd.context, @@ -60,7 +60,7 @@ namespace nadena.dev.modular_avatar.core.editor } } - [MenuItem("GameObject/[ModularAvatar] Setup Outfit", true, PRIORITY)] + [MenuItem("GameObject/ModularAvatar/Setup Outfit", true, PRIORITY)] static bool ValidateSetupOutfit() { if (Selection.objects.Length == 0) return false; diff --git a/Packages/nadena.dev.modular-avatar/Editor/Menu/MenuExtractor.cs b/Packages/nadena.dev.modular-avatar/Editor/Menu/MenuExtractor.cs index 8ce9865d..0347b1dc 100644 --- a/Packages/nadena.dev.modular-avatar/Editor/Menu/MenuExtractor.cs +++ b/Packages/nadena.dev.modular-avatar/Editor/Menu/MenuExtractor.cs @@ -12,12 +12,12 @@ namespace nadena.dev.modular_avatar.core.editor { private const int PRIORITY = 49; - [MenuItem("GameObject/[Modular Avatar] Extract menu", false, PRIORITY)] + [MenuItem("GameObject/ModularAvatar/Extract menu", false, PRIORITY)] static void ExtractMenu(MenuCommand menuCommand) { if (!(menuCommand.context is GameObject gameObj)) return; var avatar = gameObj.GetComponent(); - if (avatar == null || avatar.expressionsMenu == null) return; + if (avatar == null || avatar.expressionsMenu == null || avatar.expressionsMenu.controls.Count == 0) return; var parent = ExtractSingleLayerMenu(avatar.expressionsMenu, gameObj, "Avatar Menu"); parent.AddComponent(); diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index b1219df0..1f1a1391 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -327,7 +327,7 @@ PlayerSettings: m_Automatic: 0 - m_BuildTarget: iOSSupport m_APIs: 10000000 - m_Automatic: 1 + m_Automatic: 0 - m_BuildTarget: AppleTVSupport m_APIs: 10000000 m_Automatic: 0 @@ -337,6 +337,9 @@ PlayerSettings: - m_BuildTarget: WindowsStandaloneSupport m_APIs: 02000000 m_Automatic: 0 + - m_BuildTarget: MacStandaloneSupport + m_APIs: 10000000 + m_Automatic: 0 m_BuildTargetVRSettings: - m_BuildTarget: Standalone m_Enabled: 1