From fd323fda60bbb5b316120733cea56a77a89d76c8 Mon Sep 17 00:00:00 2001 From: Kohei-Yanagida Date: Fri, 26 Feb 2021 19:45:24 +0900 Subject: [PATCH] Check Keyframe length of AnimationCurve --- Assets/UniGLTF/Runtime/UniGLTF/IO/AnimationExporter.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Assets/UniGLTF/Runtime/UniGLTF/IO/AnimationExporter.cs b/Assets/UniGLTF/Runtime/UniGLTF/IO/AnimationExporter.cs index 4a55e5d64..3dfc65db7 100644 --- a/Assets/UniGLTF/Runtime/UniGLTF/IO/AnimationExporter.cs +++ b/Assets/UniGLTF/Runtime/UniGLTF/IO/AnimationExporter.cs @@ -129,6 +129,11 @@ namespace UniGLTF { var curve = AnimationUtility.GetEditorCurve(clip, binding); + if (!curve.keys.Any()) + { + throw new Exception("There is no keyframe in AnimationCurve : " + clip.name); + } + var property = AnimationExporter.PropertyToTarget(binding.propertyName); if (property == glTFAnimationTarget.AnimationProperties.NotImplemented) {