From 3f65250c64a69cda32a1afd777aab3242545c1c2 Mon Sep 17 00:00:00 2001 From: bd_ Date: Thu, 24 Nov 2022 18:00:18 -0800 Subject: [PATCH] Fix null in generated submenus breaking av3emu --- .../Editor/MenuInstallHook.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Packages/nadena.dev.modular-avatar/Editor/MenuInstallHook.cs b/Packages/nadena.dev.modular-avatar/Editor/MenuInstallHook.cs index e5dc19f6..2968b9cc 100644 --- a/Packages/nadena.dev.modular-avatar/Editor/MenuInstallHook.cs +++ b/Packages/nadena.dev.modular-avatar/Editor/MenuInstallHook.cs @@ -1,9 +1,11 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; using System.Linq; using UnityEditor; using UnityEngine; using VRC.SDK3.Avatars.Components; using VRC.SDK3.Avatars.ScriptableObjects; +using Object = UnityEngine.Object; namespace nadena.dev.modular_avatar.core.editor { @@ -72,7 +74,13 @@ namespace nadena.dev.modular_avatar.core.editor { name = "More", type = VRCExpressionsMenu.Control.ControlType.SubMenu, - subMenu = newMenu + subMenu = newMenu, + parameter = new VRCExpressionsMenu.Control.Parameter() + { + name = "" + }, + subParameters = Array.Empty(), + labels = Array.Empty(), }); _installTargets[installer.installTargetMenu] = newMenu;