Animating a Sprite from Parent Animator

I’ve created a 2d character for my game that uses both bone based animation and frame-based spritesheet animation.

For most of the different parts of my character, attaching an animator directly to the component (Hands, Head, etc.) and animating the sprites directly on the same GameObject works fine. However, in order to sync the sprite animation of the body with the walk/run cycle (which are bone based animations), I have to animate the body’s sprite from the parent game object (which animates the arms and legs for the walk/run cycle).

However, I’m unable to add the ‘Sprite’ property of the child (the body) to an animation in the parent (a mostly empty gameobject holding a hierarchy of ‘bones’ for the character).

Typically, when wanting to animate a property of a child, I expand that child’s hierarchy in the animation window and click the ‘plus’ button next to the desired property. However, this plus button is missing from the ‘Sprite’ property:

70419-snip.png

I have, in desperation, tried dragging the sprite directly into the animation, but it just adds a sprite renderer to the parent.

How can I accomplish this?

You shouldn’t use multiple Animators, you should use one on the parent, and add the parts that need to be animated separately to their own layers in the AnimatorController.