titidatiti

I'm using SkeletonAnimator because it's convenient in Unity, but I found a bug when I use interruption source in Animator.
QQ图片20181109232047.png

I have a transition from A to B, and one from A to C. The transition from A to C has a higher priority.
I set both two transition's interruption source to current state, which enables a transition interruption.

In Unity, the result should be like this:
When the animator is playing a transition from A to B, the transition A to C can interrupt the transition, and start a new transition from X to C.

However, the spine animation just stops playing until the transition from X to C is finished. Then it suddenly starts playing from the next frame after the transition of animation C. (It means if the transition of X to C ends at the 5th frame of C, the animation starts playing from the 6th frame of C)
QQ图片20181109233834.gif

When the player is playing a landing animation, I move the player, and the transition goes from landing to moving.
Then the player starts to fall, so the animator interrupt the transition and starts the transtion from X(a state between landing and moving) to falling .
However, the transition from X to falling is totally wrong. It just stops all the animations and plays nothing (just like T-pose in 3D games):
QQ截图20181109234716.jpg

Anyone has an idea about how to deal with the problem, or it's just a bug in Spine-Unity's SkeletonAnimator?

Many thanks.
Avatar de Usuario
titidatiti
Mensajes: 4

Pharan

Did you check your falling state in the state machine to see if the dummy AnimationClip on it is actually set?
Avatar de Usuario
Pharan

Pharan
Mensajes: 5284

titidatiti

Pharan escribió:Did you check your falling state in the state machine to see if the dummy AnimationClip on it is actually set?
Yes. If I just move the player and fall, without interrupting any transition, the transition from moving to falling works perfectly.
I made a simple animator with only 3 animations with different end time to test the bug, and it also shows the same problem:
bug2.gif

bug.gif

2.jpg

3.jpg

4.jpg


---
No new replies up to now...sad...

I guess maybe I should use SkeletonAnimation with self-defined state machine instead of SkeletonAnimator which is new and incomplete. It's quite a pity. :(
Avatar de Usuario
titidatiti
Mensajes: 4

badlogic

Hey, sorry you haven't gotten an answer yet! Pharan's currently away for a bit. We'll try to get you an answer to this specific issue as soon as possible!
Avatar de Usuario
badlogic

Mario
Mensajes: 1451

Pharan

Are you able to send us a zipped copy of this test case? I'm not able to repro it.

You can send it to unity@esotericsoftware.com
Avatar de Usuario
Pharan

Pharan
Mensajes: 5284

Harald

I'm very sorry that you did not receive any solution to the problem yet.
Jumping in to help on the subject, I was already able to reproduce your problem - your description was really precise an helpful, thanks for that! This really seems to be a bug - either on our side or on Unity's API returning incorrect animation clip state. Currently working on the bugfix with highest priority.
I'll keep you updated and let you know as soon as we have the bugfix ready.

Thanks for your patience.
Avatar de Usuario
Harald

Harri
Mensajes: 5

Pharan

Thanks for checking it out Harald.
[unity] Animation not working when transition is interrupted · #1208

It is a very strange case.
Just looking at how the state machine is shown too, it doesn't seem to look right.

But as mentioned in the issue, when polling the Animator for clips within that window of time when it's interrupted, Unity seems to be returning nothing. 0 clip count. 0 clips. 0 next clips. No information. Without the correct information (or any information for that matter), there's not much we can do on the SkeletonAnimator/SkeletonMecanim side.

I've tried this setup in both Unity 5.6 and Unity 2018.2. The same thing happens.

We'll see if we can make a simple repro without involving Spine and send it as a report to Unity tech.

Admittedly, I don't work with Mecanim state machines myself often and on a detailed level. Is there anything special about your transition settings that you suspect may be causing this?
Avatar de Usuario
Pharan

Pharan
Mensajes: 5284

titidatiti

Harald escribió:I'm very sorry that you did not receive any solution to the problem yet.
Jumping in to help on the subject, I was already able to reproduce your problem - your description was really precise an helpful, thanks for that! This really seems to be a bug - either on our side or on Unity's API returning incorrect animation clip state. Currently working on the bugfix with highest priority.
I'll keep you updated and let you know as soon as we have the bugfix ready.

Thanks for your patience.
Thanks for the reply. Looking forward to the improvement, for Spine is really a good tool for 2d games.
Avatar de Usuario
titidatiti
Mensajes: 4

Harald

Thanks, very glad you like Spine!
We just discovered that although clipCount and nextClipCount both return 0, the nextClips array is filled with one entry (that's all we get) - therefore we shall be able to create a bugfix soon. So if everything can be worked-around as expected, no need to wait for Unity to fix anything.
Avatar de Usuario
Harald

Harri
Mensajes: 5

titidatiti

Harald escribió:Thanks, very glad you like Spine!
We just discovered that although clipCount and nextClipCount both return 0, the nextClips array is filled with one entry (that's all we get) - therefore we shall be able to create a bugfix soon. So if everything can be worked-around as expected, no need to wait for Unity to fix anything.
That's quite a good news! :rock:
Hope everything goes well!
Avatar de Usuario
titidatiti
Mensajes: 4


Volver a Bugs