null check

This commit is contained in:
ousttrue
2021-06-15 15:01:17 +09:00
parent 9945a1c6cf
commit ca2d28ddfb

View File

@@ -64,8 +64,11 @@ namespace UniVRM10
m_so = value != null ? new SerializedObject(value) : null;
m_constraints = null;
var animator = Root.GetComponent<Animator>();
m_head = animator.GetBoneTransform(HumanBodyBones.Head);
if (Root != null)
{
var animator = Root.GetComponent<Animator>();
m_head = animator.GetBoneTransform(HumanBodyBones.Head);
}
}
}