• Unity
  • Animation Complete event not happening on a 4K display

Hi,

it might sound weird but it's just like the title says.
We have an introduction to the game with a bunch of SkeletonGraphics playing one after another and it works fine, but then if we test it on a 4K screen, the game apparently does not throw the Animation Complete event. We use Playmaker, and the action we use works everywhere in the game, but not for this case. If we send an event with the length of the animation that's failing the game continues without problem, so we think it's not a playmaker issue, but we aren't really sure what can be happening.

The code we use for subscribing to the Complete event is (in case you ask):

private void HandleComplete(TrackEntry trackEntry)
        {
            bool fire = true;

        if (this.animationName != "" && this.animationName != trackEntry.Animation.Name)
            fire = false;
        if (this.eventName != "" && this.eventName != "Animation Complete")
            fire = false;
        if (fire)
        {
            if (conditionEvent != null)
                Fsm.Event(conditionEvent);
        }
    }

And attached you can find the json of the spine that's causing the trouble. More specifically, the fade_out animation.

Do you know by any means what can be failing here and why only on builds played on 4K screens?

Related Discussions
...
  • Изменено

Did you add Debug.Log statements at the start of the method to verify that the Complete event is actually not called? Or did you just assume from your game logic which is happening thereafter?

I would suggest to subscribe to the skeletonAnimation.AnimationState.Complete delegate directly for testing purposes, and add Debug.Log statements there. This way you can rule out any issues in the PlayMaker integration.
See here on how to do that:
spine-unity Runtime Documentation: Processing AnimationState Events

Well sorry for the inconvenience, but the problem had nothing to do with Spine or Playmaker. It is fixed now.

Thank you and sorry again!

10 дней спустя

Glad to hear, thanks for getting back to us!