- 已编辑
SkeletonAnimation not always playing
Hi,
We're using SkeletonAnimation in Unity for our character animations (with different skeletons for each character).
All animations are triggered using the same call skeletonAnimation.AnimationState.SetAnimation(0, animation, loop);
This works fine 99% of the time, but sometimes the requested animation fail to start.
It's totally random between our different skeletons and animations.
An example is when moving 4 characters at the same time and only 3 of them start their walk cycles, the last one slides.
From debugging this, it looks like we always trigger the expected animation (and don't override it from somewhere else or anything like that), which makes me think the issue might be in Spine code.
Any suggestions on what might cause this or how to debug it further?
Thanks!
(using version 3.8.)
leXor :From debugging this, it looks like we always trigger the expected animation (and don't override it from somewhere else or anything like that), which makes me think the issue might be in Spine code.
Sorry to say that the cause of your problem is most likely located in your Unity code issuing the skeletonAnimation.AnimationState.SetAnimation(0, animation, loop);
call. From where are you calling this SetAnimation()
line? Is it dependent on user input, and are you setting animations at the skeleton before the problematic animation?
If you can create a minimal Unity project that still demonstrates this issue, we will of course happily fix any issues on the spine-unity side. You can send the project as a zip package to contact@esotericsoftware.com.
like the problem use 4.0,May I ask if it has been resolved in the end?