- Home /
Question by
kyomazunki · Feb 02, 2019 at 06:04 AM ·
animationgameobjectanimatorgetcomponentanimations
Animator.SetBool not changing
The title says it all. No console errors. Just nothing happens. It's supposed to stop and animation, but doesn't work.
And Yes It Is Named Correctly
switch (collision.gameObject.tag)
{
case "EnemyDog":
collision.gameObject.GetComponent<Animator>().SetBool("animgo", false);
print(collision.gameObject.name);
break;
case "Player":
break;
default:
break;
}
Comment
Answer by hameed-ullah-jan · Feb 02, 2019 at 07:09 AM
Have you added this bool to the state transitions graph correctly, and also uncheck the 'Has exit time' bool under transition section.
Answer by Michael_Berna · Oct 14, 2021 at 09:00 PM
I had the same issue, it turns out in my case, it was caused by UMA. I turned off the editor time generation and it fixed the issue.
Your answer
Follow this Question
Related Questions
Animator animation transition twitch at the start 1 Answer
Pause Menu issue with mouse 1 Answer
The animation does not play when I click 2 Answers