Animated Overlay Armor Sprite

I’m making a 2D top-down RPG, and I want the player to be able to equip different pieces of armor which are shown on the on-screen sprite. I’ve got a weapon system working easily, since that’s just a static sprite that moves and rotates with the player (as a child gameobject), but the armor is different because it has to be animated.

My idea was to create “cut outs” of the armor pieces and then overlay them on top of the player as they move (i.e. the corresponding armor animation frame will be overlaid on top of the player), thus avoiding having to do something like create separate player sprites (wearing armor) for every single armor combination possible. The problem is that I can’t seem to find any way of effectively doing this that isn’t just as long-winded as having all the separate sprites.

The closest I’ve got is having a bunch of child gameobjects corresponding to each frame of player animation that get activated and de-activated when the player moves, but this seems like another long-winded way of doing it.

tl;dr I want to have something like a child gameobject of the player that animates along with player movement, i.e. not just a static sprite that gets rotated (since it has to “articulate” with the player), but I don’t know how to do this. I’m fairly new to Unity so I wondered if I was missing something really obvious.

  1. You can create a sheet with all the armor cutouts.
  2. Create a child SpriteRenderer called ArmorSprite or w/e. Set it’s Order in Scene to be rendered in front of rest of the player.
  3. In the animations editor, try animating the ArmorSprite .sprite property to the appropriate ones.
  4. You can later use the same SpriteRenderer for skinning (i.e. different armor overlays instead).