mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-01-01 20:25:07 +08:00
MergeArmature: Correctly mark dirty
This commit is contained in:
parent
5ca2728b4a
commit
ca32c75811
@ -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))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user