diff --git a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Windows/SkeletonBaker.cs b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Windows/SkeletonBaker.cs index 316cda832a..ed15a2a87c 100644 --- a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Windows/SkeletonBaker.cs +++ b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Windows/SkeletonBaker.cs @@ -130,6 +130,8 @@ public static void GenerateMecanimAnimationClips (SkeletonDataAsset skeletonData } } + SkeletonData skeletonData = skeletonDataAsset.GetSkeletonData(true); + foreach (Animation animations in data.Animations) { string animationName = animations.Name; // Review for unsafe names. Requires runtime implementation too. spineAnimationTable.Add(animationName, animations); @@ -144,6 +146,7 @@ public static void GenerateMecanimAnimationClips (SkeletonDataAsset skeletonData } AnimationClip clip = unityAnimationClipTable[animationName]; + clip.frameRate = skeletonData.Fps; clip.SetCurve("", typeof(GameObject), "dummy", AnimationCurve.Linear(0, 0, animations.Duration, 0)); AnimationClipSettings settings = AnimationUtility.GetAnimationClipSettings(clip); settings.stopTime = animations.Duration;