2D sprite skin: Sprite sometimes fails to follow bone

I’m using the Sprite Skin component, along with a Sprite Resolver on an animated character that can also ragdoll. There is an issue where sometimes either the head or the body sprite will fail to attach to their assigned bones and just not move.


In the screenshot above, the body is frozen still.

I’ve tried:

  • Disabling and enabling auto rebind. For some reason, this fixes the issue if I do it manually in the inspector, but not if do it during runtime.
  • Enabling/disabling the sprite skin component.

One odd thing I’ve noticed, is that the body skin has a lot of bones listed, even though all the vertices of the sprite are only assigned to a single bone; body_upper.

So far, I haven’t found a reliable way to fix the issue. Has anyone else experienced this?

I may have found a solution for this, by copying some of the code from the SpriteSkin editor script, and adding it as a public function in the SpriteSkin class.


I run this after changing the sprites of the keeper character.

So far, I haven’t seen it fail.

Which version of the 2D Animation package are you using?

Would you be able to file a bug report with a repro project? That way we can take a look at it on our side and find a proper fix.

I’ve had the same issue, I used your fix to solve it. Swapping Labels on a Sprite Resolver seems to mess with Sprite Skins sometimes.

Hope there’s an official fix for it soon. Running the Rebind function every frame is unnecessarily heavy.

1 Like

I didn’t need to run it every frame in my case, but I suppose you do if you’re swapping sprites continuously.

Yeah I have a 2D animation that uses both skeletal animation and sprite swapping that loops, and sometimes it just breaks and has to be rebound. I cannot find any particular pattern to when it fails and not.

It seems okay to run the auto rebind 10 times per second and not noticing any weird graphical bugs and not having it run every single frame.