mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-19 00:06:42 +08:00
[unity] Set fps at generated SkeletonMecanim animation clip assets. Closes #2395.
This commit is contained in:
parent
2f7b431821
commit
1cdbf9be1a
@ -130,6 +130,8 @@ namespace Spine.Unity.Editor {
|
||||
}
|
||||
}
|
||||
|
||||
SkeletonData skeletonData = skeletonDataAsset.GetSkeletonData(true);
|
||||
float fps = skeletonData != null ? skeletonData.Fps : 0.0f;
|
||||
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 @@ namespace Spine.Unity.Editor {
|
||||
}
|
||||
|
||||
AnimationClip clip = unityAnimationClipTable[animationName];
|
||||
clip.frameRate = fps;
|
||||
clip.SetCurve("", typeof(GameObject), "dummy", AnimationCurve.Linear(0, 0, animations.Duration, 0));
|
||||
AnimationClipSettings settings = AnimationUtility.GetAnimationClipSettings(clip);
|
||||
settings.stopTime = animations.Duration;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"name": "com.esotericsoftware.spine.spine-unity",
|
||||
"displayName": "spine-unity Runtime",
|
||||
"description": "This plugin provides the spine-unity runtime core.",
|
||||
"version": "4.2.97",
|
||||
"version": "4.2.98",
|
||||
"unity": "2018.3",
|
||||
"author": {
|
||||
"name": "Esoteric Software",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user