fix: scale adjuster proxy bones appear in hierarchy (#878)

This commit is contained in:
bd_ 2024-06-08 11:47:24 +09:00 committed by GitHub
parent 719c39da6e
commit 75ebb74924
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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