StateMachineBehaviour not getting called

I have a project in Unity 5.0.2. which relies on StateMachineBehaviour and works fine.

Then I upgraded to Unity 5.2.2 (or 5.2.0), after which StateMachineBehaviour aren’t receiving calls (OnStateEnter) for some GameObjects but is working for other GO, even though the animation controller are the same for both GO. The animation is trigger correctly. It’s just the SMB method is not called.

I downgrade to Unity 5.1.0. ([Edit] and 5.1.4) And everything works fine.

Any suggestions?

Thanks
David

[PS] While in PlayMode, if I make any modification to the animation controller, such as checking and unchecking WriteDefault, the SMB for the GO will start to work again. However stopping the game and starting again will revert back to same buggy behavior.

[PPS] As far as I can tell, the major difference between GOs that’s work and one which is not working is the working one is created from a Prefab, and the not work one is cloned from a scene GO.

(I am op) More information:

When SMB is not getting called, it doesn’t seems to be there! If I all animator.GetBehaviour(), I will get null.

Likewise if I call GetBehaviour on an animator which is working properly, I will get a non-null value.

This is a know bug and was fixed this week, the fix should be available soon in a patch release.

Great Thanks!

David

Mecanim.Dev

I have upgrade to 5.2.3. This problem doesn’t seem to have been fixed.

My bug actually sound very similar to this one:

Thanks
David.