Search Unity

StateMachineBehaviour not getting called

Discussion in 'Animation' started by x2unity, Oct 22, 2015.

  1. x2unity

    x2unity

    Joined:
    Oct 8, 2015
    Posts:
    14
    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.
     
    Last edited: Oct 23, 2015
  2. cybie

    cybie

    Joined:
    Sep 17, 2010
    Posts:
    91
    (I am op) More information:

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

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

    Mecanim-Dev

    Joined:
    Nov 26, 2012
    Posts:
    1,675
    This is a know bug and was fixed this week, the fix should be available soon in a patch release.
     
  4. x2unity

    x2unity

    Joined:
    Oct 8, 2015
    Posts:
    14
    Great Thanks!

    David
     
  5. x2unity

    x2unity

    Joined:
    Oct 8, 2015
    Posts:
    14
    Last edited: Dec 2, 2015