From 5bafb0ba9d2f027f9b938529389fd7595fdd5312 Mon Sep 17 00:00:00 2001 From: bd_ Date: Sat, 19 Oct 2024 17:46:39 -0700 Subject: [PATCH] fix: "extract menu to objects" does not set the target of its menu group properly (#1304) Closes: #1297 --- Editor/Inspector/Menu/MenuInstallerEditor.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Editor/Inspector/Menu/MenuInstallerEditor.cs b/Editor/Inspector/Menu/MenuInstallerEditor.cs index 5110aa36..f32efe0f 100644 --- a/Editor/Inspector/Menu/MenuInstallerEditor.cs +++ b/Editor/Inspector/Menu/MenuInstallerEditor.cs @@ -368,7 +368,7 @@ namespace nadena.dev.modular_avatar.core.editor serializedObject.ApplyModifiedProperties(); - Localization.ShowLanguageUI(); + ShowLanguageUI(); } private string ObjectHierarchyOrder(Component arg) @@ -415,6 +415,9 @@ namespace nadena.dev.modular_avatar.core.editor var group = installer.gameObject.AddComponent(); var menuRoot = new GameObject(); menuRoot.name = "Menu"; + + group.targetObject = menuRoot; + Undo.RegisterCreatedObjectUndo(menuRoot, "Extract menu"); menuRoot.transform.SetParent(group.transform, false); foreach (var control in menu.controls)