Hi there,
I managed to crash unity from StateMachineBehaviour.OnStateExit call. Am I doing here something “illegal”? or it’s a bug?..
So, I have a very simple scene with a button and a panel (side by side). Clicking that button animates the panel’s scale.
I also have a state machine behaviour script on the animation’s state. Inside OnStateExit I want to disable the game object, so I call the following:
animator.gameObject.SetActive(false);
and bam - unity crashes…
See attached unitypackage for my test scene.
Any help on how to go about this and/or explanation on what’s going on would be very much appreciated.