To create a state transition in an Animator Controller, follow these steps:
- Open the Animator Controller asset.
- Add at least two states by dragging and dropping two animations into the Animator window. You can also point the cursor at an empty space in the Animator window, press the right mouse button and select Create State | Empty, then select the state, and add an animation to the Motion field in the Inspector.
- Click on the right mouse button on the state you want to transition from and choose Make Transition.
- Drag the transition onto the state you want to transition to and click the left mouse button.
- A default transition will be created. The state will switch after its animation has finished playing. To be able to observe it in gameplay, make sure you transition from the default (orange) state, as only the default state will play when the game starts.