Page 1 of 2
Dialogue Panel fade out effect not happening
Posted: Mon Jan 01, 2018 11:44 am
by Abelius
Hi there,
I'm using a modified version of 'Generic Unity UI Dialogue UI', so I'm getting to see that nice fade-in effect when a conversation gets started, thanks to the Dialogue Panel Canvas Group alpha value being animated from 0 to 1.
But I'm not getting to see the opposite fade-out effect, because the NPC Subtitle Panel gets disabled just before the Canvas Group alpha starts being animated from 1 to 0.
Is there any way to (automatically) change this behavior so the panels don't get disabled before the alpha has reached zero?
Thank you.
Re: Dialogue Panel fade out effect not happening
Posted: Mon Jan 01, 2018 12:17 pm
by Tony Li
Hi,
Try using version 1.7.7.1. It's still not on the Asset Store, but I guess I have to cut them some slack since it's the holidays. If you don't have access to the Pixel Crushers customer download page, let me know and I'll PM you your access info.
In version 1.7.7.1, animation transitions have a dropdown choice between State and Trigger. Previously, it treated "Show" and "Hide" as trigger parameters by default. In version 1.7.7.1, the default is now State, which treats "Show" and "Hide" as animator state names that it plays directly without using a trigger. It was getting a little crazy handling trigger differences in Mecanim from Unity 4.6 to 2017.3. Playing states directly makes it much simpler.
Re: Dialogue Panel fade out effect not happening
Posted: Mon Jan 01, 2018 5:15 pm
by Abelius
I've updated to 1.7.7.1 for Unity 2017 but, out of the box, is still not fading out before disabling the PC and/or NPC panels.
I've got also have a flicker when subtitle panels get switched, that wasn't there before updating, so I've needed to revert to 1.7.6 to see it gone.
Should I configure the thing in a special way to get the fading out and not seeing that flicker?
Re: Dialogue Panel fade out effect not happening
Posted: Mon Jan 01, 2018 7:46 pm
by Tony Li
Sounds like I still may need to work out some kinks. Sorry in advance for the deluge of questions. I want to get to the bottom of this so I can make sure the animator stuff is working right for you.
Which panels have Animator components?
On the Unity UI Dialogue UI component, which ones specify Show and Hide triggers in their respective Animation Transitions foldouts?
Are you using the same panel for the NPC Subtitle and Subtitle Reminder, or different panels (as in the Generic UI)?
If you're using the same panel, what happens if you tick Always Visible?
(Please feel free to send an example scene with your UI to tony (at) pixelcrushers.com. I'll be happy to take a look.)
Re: Dialogue Panel fade out effect not happening
Posted: Tue Jan 02, 2018 3:38 am
by Abelius
Hi Tony, thank you for looking into this.
I've upgraded to 1.7.7.1 again to answer your questions.
Which panels have Animator components?
Only 'Alert Panel' and 'Dialogue Panel' have an animator.
Both of them are configured like this (default):
On the Unity UI Dialogue UI component, which ones specify Show and Hide triggers in their respective Animation Transitions foldouts?
Only the parent Dialogue Panel has 'Show' and 'Hide' triggers specified in 'Animation Transitions', configured as 'State'. The Alert Panel also have them like that. The rest of the panels (PC, NPC, NPC Reminder, Response) don't have triggers specified...:
Sorry for the huge screencap...
Are you using the same panel for the NPC Subtitle and Subtitle Reminder, or different panels (as in the Generic UI)?
They're different, although identical. I'm making a visual novel style game and the responses are located at the right of the text panel, like this...:
So I guess I could have used the NPC Subtitle Panel as reminder... but the problem is that I'm using a typewriter effect on it, so it replays if I use it as the reminder panel. This is the only reason I'm using a separate panel at the moment.
If you're using the same panel, what happens if you tick Always Visible?
I'm not using the same panel, so the reminder panel gets on top of the NPC one and the whole thing looks bad, but I've tried to see if it made some difference... and it did...: the flicker when changing panels is still there, but the fade out is executed correctly at the end of the conversation.
Thank you for your time.
Re: Dialogue Panel fade out effect not happening
Posted: Tue Jan 02, 2018 11:34 am
by Tony Li
I'm going give this a little thought and send you a solution later today.
The Dialogue Panel fade out
is happening, but the subtitle panels and response menu panel are configured to hide immediately after they're done showing content. For example, for a one line NPC conversation, the timeline might be:
- Dialogue panel shows (fades in) -- Visible: Dialogue Panel
- NPC subtitle panel shows (activates) and plays typewriter -- Visible: Dialogue Panel & NPC Subtitle Panel
- And end of NPC subtitle duration, NPC subtitle panel hides (deactivates) -- Visible: Dialogue Panel
- Dialogue panel hides (fades out) -- Visible: nothing at end of animation
This works well for a UI design in which the Dialogue Panel actually contains visual elements, such as the machinery surrounding the subtitle panel and response menu panel in a UI like this:
But in your case, as well as the Generic Dialogue UI, all the visual elements are on the subtitle and response menu panels.
I think I'll need to add an option to keep the last subtitle or response menu panel onscreen when hiding the dialogue panel.
Re: Dialogue Panel fade out effect not happening
Posted: Tue Jan 02, 2018 12:21 pm
by Abelius
I see.
Well, I'll continue using 1.7.7.1 for the time being, as I don't expect to launch this game before four or six months yet. Plenty of time to include that option. Thank you for that in advance.
What about the flicker when switching panels? How could I help to troubleshoot that?
Re: Dialogue Panel fade out effect not happening
Posted: Tue Jan 02, 2018 1:41 pm
by Tony Li
I'll make sure that's addressed at the same time. I'll take an extra day or two to make sure it's a solid solution.
Re: Dialogue Panel fade out effect not happening
Posted: Sun Jan 07, 2018 9:49 pm
by Tony Li
Hi,
I believe the update in
this post should fix the Dialogue Panel fade-out. The issue is that the NPC Subtitle panel was being deactivated. In your dialogue UI, set the NPC Subtitle's UI Visibility to "Until Superceded". If you're using the same panel for the Response Menu > Subtitle Reminder, set its UI Visibility to "Until Superceded", too.
Re: Dialogue Panel fade out effect not happening
Posted: Tue Jan 09, 2018 3:48 am
by Abelius
Thanks Tony!
I'll take a look tonight.