Bug?: Animation Transitions Animator has not been initialized Error

Announcements, support questions, and discussion for the Dialogue System.
Saruto
Posts: 24
Joined: Sat May 09, 2015 2:21 pm

Bug?: Animation Transitions Animator has not been initialized Error

Post by Saruto »

Been playing around with the animation transitions in the Unity UI Dialogue UI component/script. I made a simple animation that expands and shrinks the windows (ie. changes the scale from 0 to 1 and vice versa).



After messing around, I found that I got an "Animator has not been initialized" warning from the console. When this message popped up, the transition animation would not play and the windows would stay inactive, but the conversation would still go on as if the windows were visible.



After some testing, I found that this happens when you try to send an OnContinue message to the instance of UnityUIDialogueUI while the "Hide" animation is still running.



I'm not exactly sure if this is a bug, or if I incorrectly set up the Show and Hide animations (I'm not too familiar with Unity's animation stuff yet, to be honest). Even if it is a bug, it's kind of an edge case issue and it's not too hard to come up with your own patch-up solution, but I'd figure I'd still report it anyway.
User avatar
Tony Li
Posts: 22104
Joined: Thu Jul 18, 2013 1:27 pm

Bug?: Animation Transitions Animator has not been initialized Error

Post by Tony Li »

Yup, it's a bug. OnContinue short-circuits everything, and the method that waits for the animation to finish doesn't take this into account. Thanks for reporting it. I'll make sure it's addressed in the next release.
Saruto
Posts: 24
Joined: Sat May 09, 2015 2:21 pm

Re: Bug?: Animation Transitions Animator has not been initialized Error

Post by Saruto »

Sorry to revive this thread, but it looked like this was fixed back in 1.5.1, but when I updated to Version 1.5.5.1 it didn't look like the problem was solved. Has something been changed between then and now?
User avatar
Tony Li
Posts: 22104
Joined: Thu Jul 18, 2013 1:27 pm

Re: Bug?: Animation Transitions Animator has not been initialized Error

Post by Tony Li »

On what platform does the error occur?

The fix was specifically for webplayer.
Saruto
Posts: 24
Joined: Sat May 09, 2015 2:21 pm

Re: Bug?: Animation Transitions Animator has not been initialized Error

Post by Saruto »

It happens on the standalone PC/Mac/Linux platform, in both the editor and in a built game.
User avatar
Tony Li
Posts: 22104
Joined: Thu Jul 18, 2013 1:27 pm

Re: Bug?: Animation Transitions Animator has not been initialized Error

Post by Tony Li »

I identified the source of this timing issue. I'll post a fix soon.
User avatar
Tony Li
Posts: 22104
Joined: Thu Jul 18, 2013 1:27 pm

Re: Bug?: Animation Transitions Animator has not been initialized Error

Post by Tony Li »

Thanks for reporting the bug. It's fixed in this patch:

DialogueSystem_UnityUI_Patch_2015-09-27.unitypackage

If you still notice any issues, please let me know. Thanks!
Saruto
Posts: 24
Joined: Sat May 09, 2015 2:21 pm

Re: Bug?: Animation Transitions Animator has not been initialized Error

Post by Saruto »

Sweet, it seems to be much better, but there is one issue that I'm still having, but I'm pretty sure it's exclusive to me.
My game uses keyboard controls exclusively. Depending on the context, the Enter key calls both OnContinue (if in a conversation) and OnUse to start a new conversation (if one is not currently happening). The patch fixed the OnContinue issue (thanks a ton by the way!), but now by spamming the "Enter" key on an NPC, a bug arises when you try to start a new conversation before the Hide animation has finished playing. What happens exactly is that the dialogue windows don't properly deactivate and will stay active - but invisible - forever.
It seems pretty easy for me to find a workaround - you could just stop any OnUse calls from happening while the animations are playing - but I'm sure you would like to know about it.
Thanks for all the help so far!
User avatar
Tony Li
Posts: 22104
Joined: Thu Jul 18, 2013 1:27 pm

Re: Bug?: Animation Transitions Animator has not been initialized Error

Post by Tony Li »

Thanks for letting me know. I'll look into this tomorrow and try to work up a fix!
User avatar
Tony Li
Posts: 22104
Joined: Thu Jul 18, 2013 1:27 pm

Re: Bug?: Animation Transitions Animator has not been initialized Error

Post by Tony Li »

Would it be possible for you to send me an example project that demonstrates the issue? I'm having trouble reproducing the issue. I'll PM you an upload link in case the project is too big to email to tony (at) pixelcrushers.com.
Post Reply