Merge pull request #1037 from ousttrue/fix10/null_check

null check
This commit is contained in:
PoChang007
2021-06-15 15:02:35 +09:00
committed by GitHub

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);
}
}
}