sandglass First, I will explain the more common method of achieving weapon-specific attack animations while using the same skeleton for both the character and the weapon.
It's a common scenario where a character might wield various weapons, and each weapon requires different animations due to factors like varying grip positions or necessary movements. In such cases, skins are often utilized.
Skins can include not only attachments, but also bones and constraints. This allows you to change the weapon's appearance while simultaneously enabling bones and constraints specific to that weapon, enabling you to consolidate animations for multiple weapons into a single animation.
The official sample skeleton, Hero, serves as an example of this setup. This skeleton has skins named sword
and morningstar
. Examining the Tree View, you'll notice a triangle symbol next to the skin names. Expanding these reveals that each skin contains bones and constraints specific to that weapon. Switching the appearance confirms that not only the weapon's look changes, but its bones do too:


This is the commonly used structure.
Alternatively, using a bone follower to equip weapons as you're attempting is also a valid approach. This is especially desirable when weapons are scattered around the game world and need to be picked up and used.
If you want to display other GameObjects between parts of your character, you can use the SkeletonRenderSeparator
component. For detailed usage instructions, please refer to the following section in the documentation:
https://esotericsoftware.com/spine-unity-utility-components#SkeletonRenderSeparator
Using this alongside skins allows you to activate specific bones and constraints for a weapon when you equip it. This allows you to modify the character's pose and movement in common animations, such as idle animations.
If you have any questions or if something doesn't seem to work for your specific situation, please feel free to ask additional questions.