mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-08-26 04:39:51 -05:00
null check
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user