How to correctly setup all the Unity Animator character transitions?
The Animator is a FSM - Finite State Machine. First, we create few distinct states that will define our character behavior. For the plaformer we will have at least 3 states: Idle, Run and Jump. Second, we add conditions based on subject. For example: character staying idle, then he run or jump then return back to idle.
To repeat:
0. Create new animation 'Idle' in the 'Rose' animations folder
1. Select Animator or open it via 'Window' if not - define all the states
2. Open 'Project' ... - sprites with animation
3. Place animation sprites to the span
4. Animator - create two empty states - rename them to 'Run', 'Jump'
5. Add parameters via '+▼' - Float 'isRun' + bool 'IsJumping'
6. Select 'Rose ▼' Animation - Create New Clip... - 'Jump.anim' - drag N drop sprites
7. Animator - define states - select state 'Run'
8. Select Run Animation - Create New Clip... - 'Run.anim' - drag N drop sprites
9. Animator - select 'Rose' idle state - RMB - Make transition - drag arrow to Run
10. Transition arrow - uncheck 'Has Exit time' - set 'Transition Duration' to 0
11. Select special state 'Any state' - arrow transition to 'Jump' state
12. Transition - uncheck 'Has Exit time', 'Can Transition To Self' - set 'Transition Duration' to 0
13. Select '+' in the conditions list - IsJumping - true
14. Transition from Jump to Run state - uncheck 'Has Exit time' - set 'Transition Duration' to 0
15. Select '+' - IsRun - Greater - 0.1 + IsJumping - false
16. Transition from Jump to Idle state - uncheck 'Has Exit time' - set 'Transition Duration' to 0
17. Select '+' - IsRun - Less - 0.1 + IsJumping - false