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.
I'm having the same issue :(
İssue tracker link: https://issuetracker.unity3d.com/issues/animation-transition-from-entry-node-to-a-default-state-not-happening-after-disabling-and-re-enabling-gameobject-during-playmode
Same problem here! When version 5.6.0p1 will be released with the fix? All our animators are broken since the update to Unity 5.6.0f3
Answer by SaintGrey
Apr 25 at 05:12 AM
Animator.enable = true;
Animator.Play("your entry state", 0, 0f);
This worked for me. Thank you!
Answer by SaraCecilia
Apr 06 at 08:13 AM
Hi, this should be fixed in 5.6.0p1.
Answer by Jix
Apr 11 at 08:39 PM
The solution that worked for me is when an object gets disabled I do something like this
And in OnEnable()
if(myAnimator == null)
myAnimator = gameObject.AddComponent<Animator>();
myAnimator.runtimeAnimatorController = myPrefab.myAnimator.runtimeAnimatorController;
//Don't forget to set applyRootMotion and the avatar if needed
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a site navigation guide.
If you are a new user to Unity Answers, check out our FAQ for more information.
Make sure to check out our Knowledge Base for commonly asked Unity questions.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
Answers and Comments
10 People are following this question.
Having some issues with my Animator Controller.
Animation Different in Unity 5
Lots of errors using speed multiplier in animation (2D).
Animating multiple platforms with the same Animator?
Animator parameter does not pick the value of the animation curve with the same name