Search Unity

AnimatorControllerPlayable issue with StateMachineBehaviours

Discussion in 'General Discussion' started by 01studio, Jun 22, 2019.

  1. 01studio

    01studio

    Joined:
    Jun 21, 2019
    Posts:
    1
    My problem is the following:

    I am connecting an AnimatorControllerPlayable to a graph, the default state contains a StateMachineBehaviour but Animator.GetBehaviours<> return no behaviours and I can't see them when clicking the state either. As soon as a make any change in the animator window (moving a state will work) the behaviour show up (with the word "clone" next to it)...

    The other way I have found to have them show up is to connect and disconnect at least 2 AnimatorControllerPlayable (can be from the same AnimatorController) and THEN Animator.GetBehaviours<> will return the StateMachineBehaviours BUT only on the next frame...

    Every other AnimatorControllerPlayable that I connect will have their StateMachineBehaviour showing correctly after that...

    I have tried this on 2018.4.2f1 and 2019.3.0a6.
     
  2. SavageCase

    SavageCase

    Joined:
    Jan 31, 2016
    Posts:
    8
    I got the same problem, and solved it by calling animator.Rebind() whenever I connect a new playable.