Hello. Im creating a 2D game on android. I’m having some problems with optimization. There is a player and multiple enemies with animators attached to them. Each of them have a script with these lines in void Update :
anim.SetFloat("SpeedX", myrigidbody.velocity.x);
anim.SetFloat("SpeedY", myrigidbody.velocity.y);
Then I have the animator play diffrent animations according to SpeedX and SpeedY. So I wanted to ask if this way is efficient or not ?