MergeArmature: Correctly mark dirty

This commit is contained in:
bd_ 2022-08-29 14:00:01 -07:00
parent 5ca2728b4a
commit ca32c75811

View File

@ -18,6 +18,7 @@ namespace net.fushizen.modular_avatar.core
{
EditorApplication.delayCall += () =>
{
if (this == null) return;
if (mergeTarget == null && !string.IsNullOrWhiteSpace(mergeTargetPath))
{
var avatar = RuntimeUtil.FindAvatarInParents(transform);
@ -25,6 +26,9 @@ namespace net.fushizen.modular_avatar.core
{
mergeTarget = avatar.transform.Find(mergeTargetPath)?.gameObject;
}
if (mergeTarget != null) {
RuntimeUtil.MarkDirty(this);
}
}
else if (mergeTarget != null && mergeTargetPath != RuntimeUtil.AvatarRootPath(mergeTarget))
{