I’ve got a sprite that has a distinct left and right appearance. They aren’t mirrors of each other, so the bones are in different places. The two sprites are on a single sprite sheet. They were created from pngs; I added bones in Unity. Each sprite has its own bone set in the skinning editor.
As the player pushes left or right, I use an animator to change the sprite to the correct version. Simultaneously, I change the Sprite Skin to use the correct bone set.
The problem is that the animator records the Root bone, but not the bones in the list. This is true even if I drag the bones from the hierarchy directly on to the bone list. So, for one of the sprites I get a warning that “Bone list doesn’t contain a reference to the root bone” and it doesn’t work for one of the facings.
You can see on the attached image how the animator is recording the root bone (in the red Unity uses to show recording) but not the bones in the list that I’ve marked in blue.
I tried giving all the bones the same names between the images, but it’s not a string-lookup; the list of bones is based on transforms.
So:
-
Have I approached the problem entirely incorrectly?
-
Am I not understanding how to update the bones with the animator?
-
Is there another or better approach to having an animation, with bones, with non-symmetrical sprites?