How to play animation when player is moving?

What is the simplest way to add a walking animation. I want my ‘walkright’ animation to play when my character is moving right, and my ‘walkleft’ animation to play when the character is moving left.
I am new to Unity so don’t know anything about animation or animator controllers.
Please let me know how to do this…

make sure Has Exit Time is not Checked,
if it is 1 sec it means it will be stop playing after 1 sec .


Add an animator to the object and have bools in the animator, one for walking right, and one for walking left. Have the walking script set the bools values depending on the direction that the player is walking. Then, just have the animations play depending on the bools :slight_smile: