我这边有一个spine skeletonData文件,上面有两个动画状态,如何能够类似unity animator状态机的方式控制两个动画;
一个Spine动画文件上的两个动画,怎么用unity动画状态机控制
- Modifié
Use the SkeletonMecanim
component described here:
spine-unity Runtime Documentation: SkeletonMecanim Component
使用此处描述的SkeletonMecanim
组件:
spine-unity Runtime Documentation: SkeletonMecanim Component
你可以通过[url = spine-unity Runtime Documentation: Adding a Skeleton to a Scene]将你的骨架实例化为SkeletonMecanim
来拖放_SkeletonData
资产的[/ url] 进入场景并选择“SkeletonMecanim”。 然后,您可以照常设置状态机。
You can instantiate your skeleton as SkeletonMecanim
via drag and drop of the _SkeletonData
asset into the scene and choosing SkeletonMecanim
. You can then setup the state machine as usual.
请注意,“SkeletonAnimation”是在Unity中使用Spine骨架的推荐方法,因为它提供了比“SkeletonMecanim”更完整的功能集。
Note that SkeletonAnimation
is the recommended way of using a Spine skeleton in Unity, as it provides a more complete feature set than SkeletonMecanim
.
多谢大佬,我测试之后再来回复
大佬,2d spine动画 可以用这种方式实现?
对不起,自动翻译没有很好地翻译你的问题。 你能用不同的词语解释你的问题吗?
I am sorry, the automatic translation did not translate your question well. Could you please explain your question in different words?
- I don't know which one is the example of
SkeletonMecanim
in Spine Examples. - What is different between
SkeletonMecanim
andSkeletonAnimation
as you mentionedSkeletonAnimation
has a more complete feature set thanSkeletonMecanim
.
Harald a écrit对不起,自动翻译没有很好地翻译你的问题。 你能用不同的词语解释你的问题吗?
I am sorry, the automatic translation did not translate your question well. Could you please explain your question in different words?
He said, "Thanks, Boss, I will reply after testing."
Can 2d spine animation realized in this way(The way you mentioned of utilizing 'SkeletonMecanism')?
These are all my comprehensions...
Thank you for the clarification!
Wecica a écrit1. I don't know which one is the example of SkeletonMecanim in Spine Examples.
The example scenes do not include an example of SkeletonMecanim. This is mostly due to historic reasons and the fact that the Controller of SkeletonMecanim is a normal Mecanim controller.
Documentation of SkeletonMecanim and the Controller can be found on the recently updated documentation pages here:
spine-unity Runtime Documentation: SkeletonMecanim Component
Wecica a écrit2. What is different between SkeletonMecanim and SkeletonAnimation as you mentioned SkeletonAnimation has a more complete feature set than SkeletonMecanim.
SkeletonAnimation provides the complete Spine runtime API to enqueue and set animations and control transitions on multiple tracks. It is linked more tightly to the Spine Editor, with the Spine Editor Preview view showing what you will get in Unity when using SkeletonAnimation. So there will be fewer differences (especially regarding animation transitions) between what you expect when exporting animations from Spine and what you receive on the Unity side. You can customize track mixing via a TrackEntry returned from SetAnimation()
calls, e.g. parameters like holdPrevious.
SkeletonMecanim uses Mecanim track state to control animations. It's setup is more rigid and does not allow complete customization of animation transions and mixing as SkeletonAnimation, which might not always be exactly what you want.
Wecica a écritCan 2d spine animation realized in this way(The way you mentioned of utilizing 'SkeletonMecanism')?
Yes, it can be used as described above. Please consider the documentation page section here:
spine-unity Runtime Documentation: SkeletonMecanim Component