Page 1 of 3
NPC Panel Doesn't Hide Immediately
Posted: Fri Oct 28, 2016 12:59 pm
by airwick
I have a simple NPC and Player convo. The NPC starts talking and when continuing the PC panel comes in but the NPC panel stays on screen for several seconds before it is turned off without playing the hide animation (this happens when not hitting continue on the PC dialogue). I have failed to find any more info regarding this issue and can not find additional info/options regarding the NPC panel being turned off when the PC comes up. I would like only one panel to show on screen at a time.
Any help would be appreciated.
Re: NPC Panel Doesn't Hide Immediately
Posted: Fri Oct 28, 2016 1:03 pm
by airwick
I'm using the TextMeshPro Dialogue UI
Re: NPC Panel Doesn't Hide Immediately
Posted: Fri Oct 28, 2016 3:20 pm
by Tony Li
Hi,
I'm looking into this now. What versions of Unity and the Dialogue System are you using?
Is the conversation designed to play without player interaction? That is, it shows the NPC subtitle, PC subtitle, NPC subtitle, etc., without a player response menu? Or does it also incorporate a response menu?
Re: NPC Panel Doesn't Hide Immediately
Posted: Fri Oct 28, 2016 3:39 pm
by airwick
v 1.6.6.5
Unity 5.4.1p1
The dialogue does include a response menu, I tried a conversation without a response menu and the same issue happens.
Re: NPC Panel Doesn't Hide Immediately
Posted: Fri Oct 28, 2016 3:41 pm
by Tony Li
Here's an example scene that uses a simple TextMesh Pro dialogue UI:
TMPro_Example_2016-10-28-2.unitypackage [edit: Updated package]
It runs the conversation without showing a response menu, but requiring the player to click the Continue button to progress past each line.
- To disable the Continue button, inspect the Dialogue Manager and set Subtitle Settings > Continue Button to Never.
- To show a response menu, inspect the Dialogue Manager and tick Input Settings > Always Force Response Menu.
If you can't get your dialogue UI to work like this (or however you want it to work), please feel free to send an example project to tony (at) pixelcrushers.com. I'll be very happy to take a look.
Re: NPC Panel Doesn't Hide Immediately
Posted: Fri Oct 28, 2016 5:55 pm
by airwick
Adding an animation component to the panel and setting the show and hide triggers seems to be the problem. The animation scales in the rect transform of the panel.
Re: NPC Panel Doesn't Hide Immediately
Posted: Fri Oct 28, 2016 6:38 pm
by Tony Li
Sorry, that part slipped my mind. I'll check that out now and post back here soon.
Re: NPC Panel Doesn't Hide Immediately
Posted: Fri Oct 28, 2016 8:37 pm
by Tony Li
Here's an updated example scene with animation. There was indeed an issue with subtitle panel animation that's been fixed in the code for the next release. I included the fixed script (UIShowHideController.cs) in the package below:
TMPro_Example_2016-10-28-2.unitypackage
The
Dialogue System Extras page also has an updated TextMesh Pro Support package. It's not mandatory. It just gets rid of an "OnLevelWasLoaded" API deprecation warning in the Console window.
When you set up your dialogue UI, before building for production you'll want to set your panels to their "hidden" state. In the example scene, this means the Canvas Group alpha is 0 and the GameObject is inactive. This avoids a one-frame blink and/or extra hide animation at start.
Re: NPC Panel Doesn't Hide Immediately
Posted: Sat Oct 29, 2016 2:03 pm
by airwick
Thanks for the help!
Something I overlooked that might help someone else was that I was using the Animation Names for the Show Trigger and Hide Trigger values instead of the trigger parameter names like exampled in Canvas Group Animator Controller.
Re: NPC Panel Doesn't Hide Immediately
Posted: Sat Oct 29, 2016 5:24 pm
by Tony Li
Happy to help!