chore: a little refactoring

This commit is contained in:
tliks 2024-10-26 19:12:01 +09:00
parent bebdb41424
commit 6b4a9d07dd

View File

@ -230,15 +230,20 @@ namespace nadena.dev.modular_avatar.core.editor
var meshSettings = outfitRoot.GetComponent<ModularAvatarMeshSettings>();
var mSInheritProbeAnchor = ModularAvatarMeshSettings.InheritMode.SetOrInherit;
var mSInheritBounds = ModularAvatarMeshSettings.InheritMode.SetOrInherit;
if (outfitRoot != null
&& meshSettings == null)
if (outfitRoot != null)
{
if (meshSettings == null)
{
meshSettings = Undo.AddComponent<ModularAvatarMeshSettings>(outfitRoot.gameObject);
} else if (outfitRoot != null && meshSettings != null) {
}
else
{
Undo.RecordObject(meshSettings, "");
mSInheritProbeAnchor = meshSettings.InheritProbeAnchor;
mSInheritBounds = meshSettings.InheritBounds;
}
}
if (meshSettings != null
&& (meshSettings.ProbeAnchor == null || meshSettings.ProbeAnchor.Get(meshSettings) == null