Unity 5.6 Animator.Rebind doesn't work - Animator doesn't reset on disable & re-enable gameobject

Hi, just migrated to Unity 5.6 today.

On Unity 5.5.2, when gameobject with animator is disabled then re-enabled, i can expect the animation is reset. And I am taking that advantages in my game so much. In 5.6 the behavior doesn’t like that and I tried to manually call the Animator.Rebind(), it doesn’t do anything.

Anyone has same problem ? Or anyone has already had solution ? Thank you.

Try this:

 Animator.enable = true;
 Animator.Play("your entry state", 0, 0f);

Hi, this should be fixed in 5.6.0p1.

The solution that worked for me is when an object gets disabled I do something like this

OnDisable()
{
     Destroy(myAnimator);
}

And in OnEnable()

OnEnable()
{
     if(myAnimator == null)
     {
          myAnimator = gameObject.AddComponent<Animator>();
          myAnimator.runtimeAnimatorController = myPrefab.myAnimator.runtimeAnimatorController;
          //Don't forget to set applyRootMotion and the avatar if needed
     }
}