mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-04-11 23:19:00 +08:00
chore: a little refactoring
This commit is contained in:
parent
bebdb41424
commit
6b4a9d07dd
@ -230,14 +230,19 @@ namespace nadena.dev.modular_avatar.core.editor
|
|||||||
var meshSettings = outfitRoot.GetComponent<ModularAvatarMeshSettings>();
|
var meshSettings = outfitRoot.GetComponent<ModularAvatarMeshSettings>();
|
||||||
var mSInheritProbeAnchor = ModularAvatarMeshSettings.InheritMode.SetOrInherit;
|
var mSInheritProbeAnchor = ModularAvatarMeshSettings.InheritMode.SetOrInherit;
|
||||||
var mSInheritBounds = ModularAvatarMeshSettings.InheritMode.SetOrInherit;
|
var mSInheritBounds = ModularAvatarMeshSettings.InheritMode.SetOrInherit;
|
||||||
if (outfitRoot != null
|
|
||||||
&& meshSettings == null)
|
if (outfitRoot != null)
|
||||||
{
|
{
|
||||||
meshSettings = Undo.AddComponent<ModularAvatarMeshSettings>(outfitRoot.gameObject);
|
if (meshSettings == null)
|
||||||
} else if (outfitRoot != null && meshSettings != null) {
|
{
|
||||||
Undo.RecordObject(meshSettings, "");
|
meshSettings = Undo.AddComponent<ModularAvatarMeshSettings>(outfitRoot.gameObject);
|
||||||
mSInheritProbeAnchor = meshSettings.InheritProbeAnchor;
|
}
|
||||||
mSInheritBounds = meshSettings.InheritBounds;
|
else
|
||||||
|
{
|
||||||
|
Undo.RecordObject(meshSettings, "");
|
||||||
|
mSInheritProbeAnchor = meshSettings.InheritProbeAnchor;
|
||||||
|
mSInheritBounds = meshSettings.InheritBounds;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (meshSettings != null
|
if (meshSettings != null
|
||||||
|
Loading…
x
Reference in New Issue
Block a user