diff --git a/Editor/SetupOutfit.cs b/Editor/SetupOutfit.cs index f82510a3..4259209c 100644 --- a/Editor/SetupOutfit.cs +++ b/Editor/SetupOutfit.cs @@ -233,15 +233,19 @@ namespace nadena.dev.modular_avatar.core.editor var meshSettings = outfitRoot.GetComponent(); var mSInheritProbeAnchor = ModularAvatarMeshSettings.InheritMode.SetOrInherit; var mSInheritBounds = ModularAvatarMeshSettings.InheritMode.SetOrInherit; - if (outfitRoot != null - && meshSettings == null - && outfitRoot.GetComponentInParent() == null) + + if (outfitRoot != null) { - meshSettings = Undo.AddComponent(outfitRoot.gameObject); - } else if (outfitRoot != null && meshSettings != null) { - Undo.RecordObject(meshSettings, ""); - mSInheritProbeAnchor = meshSettings.InheritProbeAnchor; - mSInheritBounds = meshSettings.InheritBounds; + if (meshSettings == null) + { + meshSettings = Undo.AddComponent(outfitRoot.gameObject); + } + else + { + Undo.RecordObject(meshSettings, ""); + mSInheritProbeAnchor = meshSettings.InheritProbeAnchor; + mSInheritBounds = meshSettings.InheritBounds; + } } if (meshSettings != null