ui: group menu items [NEEDS DOCS]

This commit is contained in:
bd_ 2023-05-11 19:42:31 +09:00
parent 1e2c821a25
commit e763281966
4 changed files with 10 additions and 7 deletions

View File

@ -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();

View File

@ -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;

View File

@ -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<VRCAvatarDescriptor>();
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<ModularAvatarMenuInstaller>();

View File

@ -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