Hey guys, I’m making a project for a Hololens 2. I’ve got a simple character with two states in the animator: Idle and walking. The Idle state can transition to walking if the isWalking parameter is set to true, and the walking state can transition to idle if the isWalking parameter is set to false.
When I click the checkbox manually in the Animator window when my project is running, it works.
The first time when I set “isWalking” via code, it also works. But then when I set isWalking to false, nothing happens, worse, it seems like the method is throwing an invisible exception because it doesn’t even hit the “Done setting walking” flag! WTF??
I’m on Unity 2019.4.10 LTS
private void SetCharacterWalking(bool walking)
{
Debug.Log($"Character walk state set: {walking}");
CharacterAnimator.SetBool("isWalking", walking);
Debug.Log("Done setting walking flag");
}