From cc784f93f8d2bcf7c098db6b8399bf1889c8f1b0 Mon Sep 17 00:00:00 2001 From: ousttrue Date: Wed, 17 Mar 2021 20:49:58 +0900 Subject: [PATCH] GetTangentMode --- Assets/UniGLTF/Runtime/UniGLTF/IO/AnimationImporterUtil.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Assets/UniGLTF/Runtime/UniGLTF/IO/AnimationImporterUtil.cs b/Assets/UniGLTF/Runtime/UniGLTF/IO/AnimationImporterUtil.cs index a5d9d65a0..dc561cbcf 100644 --- a/Assets/UniGLTF/Runtime/UniGLTF/IO/AnimationImporterUtil.cs +++ b/Assets/UniGLTF/Runtime/UniGLTF/IO/AnimationImporterUtil.cs @@ -16,7 +16,7 @@ namespace UniGLTF private static TangentMode GetTangentMode(string interpolation) { - if (interpolation == glTFAnimationTarget.Interpolations.LINEAR.ToString()) + if (string.IsNullOrEmpty(interpolation) || interpolation == glTFAnimationTarget.Interpolations.LINEAR.ToString()) { return TangentMode.Linear; } @@ -30,7 +30,7 @@ namespace UniGLTF } else { - throw new NotImplementedException(); + throw new UniGLTFNotSupportedException($"unknown interpolation: {interpolation}"); } } @@ -274,7 +274,7 @@ namespace UniGLTF if (!gltf_mesh_extras_targetNames.TryGet(mesh, out List targetNames)) { - throw new Exception("glTF BlendShape Animation. targetNames invalid."); + throw new UniGLTFNotSupportedException("glTF BlendShape Animation. targetNames invalid."); } var keyNames = targetNames