IndexOutOfRangeException: Index was outside the bounds of the array

Hey guys! Would anyone happen to know why I’m having this error thrown at me after following the lesson?

PlayerAttackingState…ctor (PlayerStateMachine stateMachine, System.Int32 attackIndex) (at Assets/… PlayerAttackingState.cs:14)

PlayerTargetingState.Tick (System.Single deltaTime) (at Assets/… PlayerTargetingState.cs:25)

StateMachine.Update () (at Assets/… StateMachine.cs:23)

Are you checking to make sure that the Combo index is >=0 before transitioning into the next Attack State?

Privacy & Terms