// OnStateEnter is called when a transition starts and the state machine starts to evaluate this state override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { if (animatorFSM == null) { animatorFSM = animator.GetComponent <AnimatorFSM>(); } Debug.Log($"New State: <color=green>IDLE</color>"); animatorFSM.SetRobotState(AnimatorFSM.RobotStates.Idle); }