Search Unity

Question SetBool not working on Unity 2020.3.32f1.

Discussion in 'Animation' started by georgeq, Jul 14, 2022.

  1. georgeq

    georgeq

    Joined:
    Mar 5, 2014
    Posts:
    662
    I have this piece of code:

    Code (CSharp):
    1.    protected void DoWalk() {
    2.       if(!walking) {
    3.          animator.SetBool("Walk",true);
    4.          walking = true;
    5.       }
    6.    }
    I was working with Unity 2020.3.22f1 and never had trouble with it, but since we moved to Unity 2020.3.32f1 SetBool sometimes works and sometimes it doesn't. If I open the project with 2020.3.22f1 it works 100% of the times, but I'm part of a team so downgrading is not an option... we're using github for version control in case that matters.

    Any ideas?