diff --git a/Editor/SetupOutfit.cs b/Editor/SetupOutfit.cs index b9ab5dd5..7d659239 100644 --- a/Editor/SetupOutfit.cs +++ b/Editor/SetupOutfit.cs @@ -230,14 +230,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) + + 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