How do you code the end of an animation?

[205115-スクリーンショット-2023-02-26-213231.png|205115]

I would like to set SetBool to True and then False when the animation is over.

I accomplish this by adding a behavior to the state in the animation controller.

In the behavior I can use timer that matches the lenth of the animation.

Another way to stop the animation is to have a transition that occurs after it in the animation controller using the exit timer.

Another way is setting a variable that a transition in the animation controller with that condition to trigger an exit.

OnStateUpdate is called on each Update frame between OnStateEnter and OnStateExit callbacks
  override public void OnStateUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
  {
    timerEnd.Interval();
    if(timerEnd.IsFinished())
    {
			animator.SetBool("introCont", false);