diff --git a/Assets/UniGLTF/Runtime/UniGLTF/IO/AnimationExporter.cs b/Assets/UniGLTF/Runtime/UniGLTF/IO/AnimationExporter.cs index 4a55e5d64e..3dfc65db7b 100644 --- a/Assets/UniGLTF/Runtime/UniGLTF/IO/AnimationExporter.cs +++ b/Assets/UniGLTF/Runtime/UniGLTF/IO/AnimationExporter.cs @@ -129,6 +129,11 @@ public static AnimationWithSampleCurves Export(AnimationClip clip, Transform roo { 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) {