I have 2 state A and B in animation window, if the variable Y is changed to true it will transit from state A to B, but when variable Y has been changed the value, it wait for the state A to complete then it transit to state B. I don't want that, I want the state A transit to B right away after I change the variable Y.
On Unity Editor, on the Animator window, select the transition from A to B and unmark the Atomic checkbox on the Inspector window.
This link gives a simple explanation on how atomic transitions work