I have set up an animation which is supposed to start when colliding with a gameobject. However, this animation occurs at the start of gameplay. The animation is supposed to occur when colliding with gameobject, and stop when exiting the gameobject. The animation starts at beginning of gameplay, then when i collide it continues. Then when I exit the object it stops as it should. However, I do not want it to start at the beginning of gameplay.
Below is an image of my Animator.
I have then linked an image of the code which shows that when entering the gameobject, the animation plays. And when exit the animation stops.