This is my code:
public class GoAnimation : MonoBehaviour {
public static bool goAnimation = true;
Animator animator;
// Use this for initialization
void Start () {
Debug.Log(“Start ->”);
animator = GetComponent();
}
// Update is called once per frame
void Update () {
if (this.animator.GetCurrentAnimatorStateInfo(0).IsName(“openEyes”))
{
Debug.Log(“Update → true”);
}
else
{
Debug.Log(“Update → false”);
goAnimation = false;
}
}
}
logs displayed false i animation doesn’t work.