You typed Sped. The compiler had no idea.

The problem
Strings, every frame.
void Update(){ animator.SetFloat( "Speed", speed ); animator.SetBool( "Grounded", grounded );}
Each call turns the name into an ID before it can find the parameter, every frame, on every character.
The fix
Hash it once.
Animator.StringToHash turns a parameter name into an int ID. Do it once, then pass the int.
"Speed"→StringToHash→an int, once
The fix in code
static readonly, then the int.
static readonly int SpeedId = Animator.StringToHash( "Speed" );static readonly int GroundedId = Animator.StringToHash( "Grounded" ); void Update(){ animator.SetFloat( SpeedId, speed ); animator.SetBool( GroundedId, grounded );}
Each name is written once, in one place. Every call after that is just a number.
Watch out
A typo can still slip in once.
StringToHash can't check your names either. But now a typo lives in one line, not twenty.
- Typo in the hash
- one line to fix
- Typo in 20 calls
- 20 places to look
- Shaders too
- Shader.PropertyToID
The rule
Name it once. Pass the number.
- Hash it
- Animator.StringToHash
- Keep it
- static readonly int
- Use it
- SetFloat( SpeedId, v )