Get when animator change state
Hi! I'm trying to animate the face of my 2D character. Because of game mecanics, I cant animate the face with the normal animations, so I change the sprite face with code.
Now, I'm getting the state tag in the LateUpdate and change the sprite. It works, but I dont know if is good Idea make:
if (anim.GetCurrentAnimatorStateInfo(0).IsTag("Move")) //ChangeSpriteToMoveFace
In the LateUpdate. This look like waste of performance.
So I want to call a Method, every time the animator change of states, and there change the sprite.
But I dont find anywhere how to know when the animator change states? Is this even posible?
Your answer
Follow this Question
Related Questions
Play animations not included in the animator. 0 Answers
Animation is not playing eventhough state shows it 0 Answers
Automate creating 2d animations for many sprite sheets 0 Answers
Animation start delay 0 Answers