737501101

我使用了Animator 控制Spine的动画添加到按钮的动画,完全没有任何反应。
研究发现只能在SkeletonMecanim 组件下才能使用。
在UI当中有没有什么方法可以实现这个功能呢?
737501101
  • Posts: 1

Harald

恐怕目前还没有简单的方法在Skeleton UI元素上使用MecanimAnimator。你需要对UI元素使用SkeletonGraphic(它是将 AnimationState 作为 SkeletonAnimation)。

I'm afraid currently there is no simple way to use a Mecanim Animator on a Skeleton UI element. You need to use SkeletonGraphic (which is using AnimationState as SkeletonAnimation) for UI elements.

你可以看看 Spine Examples/Other Examples/StateMachine SkeletonAnimation 中的 Mecanim Logic SkeletonAnimation View 示例场景,它展示了你如何将一个Mecanim Animator的状态转发到一个 SkeletonAnimationAnimationState。然而这需要一些额外的编码来适应 SkeletonGraphic。所以这很可能对你需要实现的目标来说太复杂了。

You could have a look at the Mecanim Logic SkeletonAnimation View example scene in Spine Examples/Other Examples/StateMachine SkeletonAnimation, it shows how you can forward a Mecanim Animator's state to a SkeletonAnimation's AnimationState. This would however require some additional coding to adapt to SkeletonGraphic. So this is most likely too complex for what you need to achieve.
User avatar
Harald

Harri
  • Posts: 2091


Return to 中国Spine用户