From 75ebb749243917efb8abb848feb4816ace5de308 Mon Sep 17 00:00:00 2001 From: bd_ Date: Sat, 8 Jun 2024 11:47:24 +0900 Subject: [PATCH] fix: scale adjuster proxy bones appear in hierarchy (#878) --- Editor/ScaleAdjuster/ScaleAdjustedBones.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Editor/ScaleAdjuster/ScaleAdjustedBones.cs b/Editor/ScaleAdjuster/ScaleAdjustedBones.cs index 8be1d26f..fdda046c 100644 --- a/Editor/ScaleAdjuster/ScaleAdjustedBones.cs +++ b/Editor/ScaleAdjuster/ScaleAdjustedBones.cs @@ -57,7 +57,7 @@ namespace nadena.dev.modular_avatar.core.editor.ScaleAdjuster if (!force) return null; var proxyObj = new GameObject(src.name); - proxyObj.hideFlags = HideFlags.DontSave; + proxyObj.hideFlags = HideFlags.HideAndDontSave; proxyObj.AddComponent().KeepAlive = this; #if MODULAR_AVATAR_DEBUG_HIDDEN @@ -120,7 +120,8 @@ namespace nadena.dev.modular_avatar.core.editor.ScaleAdjuster continue; } - if (entry.original.gameObject.scene != entry.proxy.gameObject.scene) + if (entry.original.gameObject.scene != entry.proxy.gameObject.scene && + entry.proxy.transform.parent == null) { SceneManager.MoveGameObjectToScene(entry.proxy.gameObject, entry.original.gameObject.scene); }