SkeletonGraphic does not render the idle animation after active unless Multiple CanvasRenderers is enabled
I'm using Spine 4.2 in Unity, and I've encountered a rendering issue with SkeletonGraphic.
The artist created an animation with an active animation followed by an idle animation.
My playback code is simply:
Spine.AnimationState.SetAnimation(0, "active", false);
Spine.AnimationState.AddAnimation(0, "idle", true, 0f);
Observed behavior
When I play the animations using SkeletonAnimation, everything works as expected:
active plays correctly.
idle starts immediately after active finishes.
- The
idle animation is rendered correctly and loops normally.
However, when I use SkeletonGraphic, the behavior is different:
active plays and is rendered correctly.
- After
active finishes, the idle animation is correctly added and starts playing.
- I can confirm from the logs/debugging that the
idle animation is actually being played and its timeline is being updated.
- However, nothing is visible on screen during
idle.
This makes it seem like a rendering problem rather than an animation-state problem.
The strange part
If I enable Multiple CanvasRenderers on the SkeletonGraphic component, the problem completely disappears.
With Multiple CanvasRenderers enabled, the exact same animation and playback code works correctly:
Spine.AnimationState.SetAnimation(0, "active", false);
Spine.AnimationState.AddAnimation(0, "idle", true, 0f);
active renders correctly, and idle is also rendered correctly afterward.
If I disable Multiple CanvasRenderers, active still renders correctly, but idle becomes invisible after the transition.
So the behavior can be summarized as:
| Component | Multiple CanvasRenderers | Result |
| ------------------- | -----------------------: | ------------------------------------------ |
| SkeletonAnimation | N/A | Works |
| SkeletonGraphic | Enabled | Works |
| SkeletonGraphic | Disabled | active renders, idle becomes invisible |
My questions
Is this a known bug or limitation of SkeletonGraphic in Spine 4.2?
Why would enabling Multiple CanvasRenderers change the rendering result in this situation?
Since the animation state and timelines continue to update correctly, I'm particularly interested in understanding what is different in the rendering path between:
SkeletonAnimation
SkeletonGraphic with Multiple CanvasRenderers = false
SkeletonGraphic with Multiple CanvasRenderers = true
I have attached the animation files/project data so that the issue can hopefully be reproduced directly.
Any explanation of what causes idle to become invisible, or what I should check in the Spine/Unity setup, would be greatly appreciated.