How to set the animator parameters correctly?

Hi, all
After a long time I was wondering how to set the animator parameters properly?

If I have 10-15 parameters that I need for the animator to work correctly, would it be correct to set all these values in one Update? Or will it be correct to set parameters like IsRun or IsAim only when the corresponding button is pressed?

Well, you change them when the need arises surely?

So triggers get triggered when they are triggered, parameters such as say velocity, get updated more frequently.

if “attacking” well turn on attacking when the bool for attacking changes… the answer has to be when its appropriate, you dont need to update all of them every update.

2 Likes

Hi! It’s generally more efficient to set parameters like IsRun or IsAim only when the corresponding button is pressed. This way, you avoid unnecessary updates and improve performance. For parameters that need constant updating, like movement speed, you can set those in the Update method. Balancing these approaches helps keep your animator responsive and efficient.

Hope this helps!

Unity - Manual: Animation Parameters
Unity Discussions - Setting Animator Parameters

Best Regards,
James Henry

1 Like