attach されていない場合でも is 演算子が true になって後続で例外になる

This commit is contained in:
ousttrue 2024-07-24 19:42:34 +09:00
parent f1bec3d486
commit 6c929f67f0

View File

@ -137,7 +137,7 @@ namespace UniGLTF
{
getBoneTransform = humanoid.GetBoneTransform;
}
else if (ExportRoot.GetComponent<Animator>() is Animator animator)
else if (ExportRoot.GetComponent<Animator>() is Animator animator && animator != null)
{
getBoneTransform = animator.GetBoneTransform;