mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2024-12-29 18:55:06 +08:00
fix: error if MergeArmature is not under an avatar (#455)
This commit is contained in:
parent
64816e7e3c
commit
01ca90fd86
@ -101,8 +101,7 @@ namespace nadena.dev.modular_avatar.core.editor
|
||||
|
||||
EditorGUILayout.Separator();
|
||||
|
||||
var enable_name_assignment =
|
||||
target.mergeTarget.Get(RuntimeUtil.FindAvatarInParents(target.transform)) != null;
|
||||
var enable_name_assignment = target.mergeTarget.Get(target) != null;
|
||||
using (var scope = new EditorGUI.DisabledScope(!enable_name_assignment))
|
||||
{
|
||||
if (GUILayout.Button(G("merge_armature.adjust_names")))
|
||||
@ -114,4 +113,4 @@ namespace nadena.dev.modular_avatar.core.editor
|
||||
Localization.ShowLanguageUI();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user