animations not running after upgrade to 5.2.2

Hello,
Fairly new to Unity so I apologize if I’m not describing my situation correctly. My situation is that I upgraded to Unity 5.2.2 yesterday from 5.2.1 and my animations have stopped working when I enable them from a script. If I have an animation active when the scene loads then the animation runs but if I set it active from script it won’t run.
A specific example of this is that I have some a UI Text object which increases in size and fades out when the user touches or mouses down on the screen. After upgrading the Animator controller becomes active but the animation doesn’t do anything. While trying to figure out what’s going on, if I click the ‘Apply Root Motion’ checkbox after the animation has been activated, the animation does run. I then tried setting the animation.applyRootMotion to true in the script and I see the checkbox get checked in the editor but the animation does not run.
Another thing I have noticed is that there is a little dialog box below the animation in Animator editor window which gives statistics like Clip Count: 1 Curves Pos:, Generic: After the animation is activated from script, the information changes to say “Not Initialized”

Finally, I tried creating a new animation controller and a new animation from scratch and adding it back to my gameobject and got the same results.

Nothing shows up in the console.

Am I missing something that should have been configured before that is showing it’s ugly head after the 5.2.2 upgrade

If the same project was working in 5.1 but not in 5.2 it either a new regression or a change in the animator behaviour.

Could you log a bug with your project and give us some step to reproduce the issue, we will take a look.

ok, thanks. I submitted a bug report. I also created a brand new project and deployed it to a device as well. I get the same results in both those scenarios as well.

In case anyone is looking at this…i downgraded back to Unity to 5.2.1 and my animations work again.

I’m seeing this too with animations created in the Unity Editor. If I scrub through the anim in the Animation Editor, it all looks correct. The animation states look like they’re playing in the Animator Window, but it’s not playing in the Editor / Game

Yes, with 5.2.2 Unity is crashing at the place where my animation should play. It just crashes and does not give any errors on the console. On XCode while testing on device it crashes at PrepareAnimationEvents(), hence the crash is surely related to some form of animation handling.
EDIT: It was working fine on 5.2.1

@Mechanim.Dev

We’ve encountered the same issue on 5.2.2p1. I can’t reproduce it in a standalone project, but I’m pretty sure it’s related to setting animator.speed to 0 during transition. When the bug happens it would make the animator into a state like attached screenshot, where the transition is played in the animator window, but the FROM state isn’t exiting, and the TO state is playing in the animator window but not in the game/editor view. The animator is stuck at the end of the FROM state.

If I disable setting animator speed to 0 entirely the issue will be gone. But the whole thing is working on 5.1.2.
I’ll try to get a small demo project later, hope this info can help you locate the issue.

Cheers.

Yes, experiencing this too. My menu has tabs which slide in based on a animator.setbool, so I activate them with animator.enabled when I first use the animation. Apparently the first use of animation does not work, but after which the sliding works fine. Can confirm that this has never been an issue, but started occurring as soon as I updated to 5.2.2f1.

Guessing theres a simple thing that we’ve overlooked and has recently been fixed, or updated, so if anyone can figure out what this is, it would be greatly appreciated.

@Mecanim-Dev I’m also using the fast and dirty “activate the animator component for a single animation” to play.
Stopped working since 5.2.2.
Currently on 5.2.2p1

Please log a new bug if you see some regression when upgrading to a new version, even if you think it the same bug it may not be related.

1 Like

Bug case is 740895. There are instructions to see the bug easily.

Downgraded to temporarily solve the problem (to 5.2.1), unfortunately that means it doesn’t have the new Xcode plugins :slight_smile: yolo

Seems like we are experiencing the same issue. We get a forced editor crash, without any dump or bug reporting tool coming up. When I attach Visual Studio to the actual Unity.exe process, (developing on Window, with x64 editor) I can catch the exception before unity is closed. Below are the stack trace and disassembly windows.

2371668--161131--crasherror.jpg

I’ve been able to easily reproduce this in 5.2.2p3 as of today.
I’ve submitted a new bug report Case 742678

I think this is fixed in 5.3.

I reported a bug related to setting an animator speed to 0 back in v 5.2.0. When the animator speed is set to 0, Matrix4x4 conversion errors occur.

https://fogbugz.unity3d.com/default.asp?726301_tvrken2ivspa40h4

The issue was fixed in 5.2.1.
Now it is back in 5.2.2.

Having the same problem. Animators on game objects that have been disabled then re-enabled do not play, and I get the error “Animator not initialized”.

They said that this will be fixed on 5.3

I wish they’d release patches for bugs like this for users who dont have PRO :frowning:

What do you mean? patch release are public for everyone