Hi there,

I've run into a bug in Unity Spine where an attachment that should be visible does not display in the following circumstance:

(For ease - YES is the animation where it should be visible and NO is the one where it should be hidden)
(This is using Unity 2018.3.12f1, and latest Spine 3.7 runtimes from GitHub)

1. The attachment is turned on in the setup pose
2. The YES animation does not key the visibility of the attachment
3. The NO animation keys the visibility of the attachment to turn it off
4. In Unity the skeleton's initial animation (set in the inspector) is the NO animation
5. Code changes animation to YES immediately on start up (using SkeletonAnimation.animationName)

In this situation, the attachment is correctly turned off during initialisation for the NO animation, but when shifting over to the YES animation it does not turn the attachment on.

Visibility behaves as expected in the Spine editor, and also the issue does not occur if the animation is changed after a delay instead of being immediate.

I have emailed a repro project to

Thanks for taking a look!
  • Сообщения: 5


Hi Rob,
We have finally found and fixed the problem. The problem was in our SkeletonAnimation code: a call to PoseSkeleton instead of SetAnimation, which did not set the AnimationState, so it was not mixed out when switching to your animation on Start().
Some major changes were done in order to fix your issue and multiple related ones. Due to the behaviour-changing nature of the modifications we have applied it to the 3.8-beta branch only, not to the stable 3.7 branch. Spine 3.8 will be released rather soon, though.

I now see a few options for you: You could:
a) use the Spine 3.8 runtime with the bugfix applied
b) integrate the necessary changes into your own SkeletonAnimation.cs file, the modifications to the source are in this git commit:
c) or you could simply set the initial animation variable in the inspector to <none>, instead of any animation, which will lead to correct behaviour.

Option (c) should be easiest to apply, of course.
Аватара пользователя

  • Сообщения: 1826

Вернуться в Bugs