mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-02-01 19:22:55 +08:00
Fix NPE when inspecting BoneProxy outside of an avatar
This commit is contained in:
parent
76d2adefd3
commit
c0ea7f7e7e
@ -34,7 +34,7 @@ namespace net.fushizen.modular_avatar.core.editor
|
|||||||
var t = (ModularAvatarBoneProxy) targets[i];
|
var t = (ModularAvatarBoneProxy) targets[i];
|
||||||
var av = RuntimeUtil.FindAvatarInParents(t.transform);
|
var av = RuntimeUtil.FindAvatarInParents(t.transform);
|
||||||
|
|
||||||
if (parentAvatar == null) parentAvatar = av.gameObject;
|
if (av != null && parentAvatar == null) parentAvatar = av.gameObject;
|
||||||
if (av == null || parentAvatar != av.gameObject)
|
if (av == null || parentAvatar != av.gameObject)
|
||||||
{
|
{
|
||||||
base.OnInspectorGUI();
|
base.OnInspectorGUI();
|
||||||
|
Loading…
Reference in New Issue
Block a user