Bug in 2D Animation package?

Hey guys,

im Using the 2D Animation package 5.1.1.

I have a problem with the “sprite skin” script. On my screenshot, you can see my “lower left leg” sprite has 2 bones. But “sprite skin” has troubles to get the full list of both bones. It only finds 1 bone.
All the lower limps like “lower right leg”, “lower right arm”, etc. have the same issue. But for all the upper limbs like “upper left leg” this script finds all bones.

It seems like “sprite skin” has a issue with bones that are directly connected to another bone.

Just dragging the missing bone into the script is not a solution.

Hey,

When using sprite swapping with the Sprite Resolver component, you need to make sure that all sprites have identical bones in their hierarchy, and the bones are in the same order.

So for “Player1” make sure that the “lowerLegLeft1” sprite has the “Upper Left Leg Bone” and “Lower Left Leg Bone” as part of its bone hierarchy, and in that order.

This is most likely the issue; if this didn’t solve it, please let me know.

1 Like

First of all thank you so much for responding! Yes you assumed right that “lowerLegLeft1” from “Player1” doesn’t have the same amount of bones like “lowerLegLeft2” sprite from above does, but i dont think thats the problem.

If you take a look at the attached screenshot, you can see that “upperlegleft1” sprite and “upperlegleft2” dont have the same bone amount, but its still working just fine in that case.

7967682--1021830--BoneScreenshot1.jpg

Edit:
I also tried to switch the order of the bones, didnt help. But i noticed that the order in in the Inspector also changes, its just Unity struggles to fill the correct bone into the correct field

It’s possible that it works without having identical bone hierarchies, but that is still likely the issue. Can you try adding the same bones for both? You don’t actually have to assign weights to all of the bones, they just need to be in the hierarchy.

1 Like

Thank you so much !!! Saved me. I just added a weightless bone to the other sprite and it worked :smile:

1 Like