Last updated: Sep 7, 2022

Introduction

The Play Weapon Animation State Machine Behaviour plays an animation on the player’s equipped weapon. This is very helpful when we want to play an animation on both the character and also on the weapon, which actually happens a lot!

Overall, this component is really important and is used basically in every single Action Layer state in our default Animator component used in the demo.

You can find the Play Weapon Animation at this path: Assets\Infima Games\Low Poly Animated - Modern Guns\Demo\Code\Animation\PlayWeaponAnimation.cs

Fields Serialized

State Name. Name of the AnimState to play.

Layer. Layer the AnimState is played on.

Fields

Player Character. Reference to the player character’s CharacterBehaviour component.

Player Inventory. Reference to the player character’s InventoryBehaviour component.