Page 1 of 2

Adding Dialogue UI to Dialogue Manager

Posted: Tue Feb 04, 2020 12:10 pm
by IGOR824
Hi there,

I've created my own Dialogue UI basing it off of the Basic Standard Dialogue UI but when I attach my custom UI to the Dialogue Manager it doesn't display any of the panels. But, when I use the Prefab of the Basic Standard Dialogue UI my scene works as intended. I'm certain that I've attached the right scripts to each panel and the correct objects in the right elements. I'm wondering if there is something that I'm missing outside of this when using a custom UI?

Thanks.

Re: Adding Dialogue UI to Dialogue Manager

Posted: Tue Feb 04, 2020 1:15 pm
by Tony Li
Hi,

Inspect the Dialogue Manager. Assign your custom UI to the Display Settings > Dialogue UI field.

Re: Adding Dialogue UI to Dialogue Manager

Posted: Tue Feb 04, 2020 1:20 pm
by IGOR824
Hi there, thanks for the response,

I followed the UI tutorial and that is what I've already done. My UI is attached to the canvas and I assigned the UI I made to the Dialogue UI field inside the Dialogue System Controller which is on the Dialogue Manager.. When I hit play scene I get the audio dialogue from the conversation but none of the text panels appear.

Re: Adding Dialogue UI to Dialogue Manager

Posted: Tue Feb 04, 2020 1:30 pm
by Tony Li
Hi,

Inspect the dialogue UI's StandardDialogueUI component.

Make sure your subtitle panel(s) are assigned to the Conversation UI Elements > Subtitle Panels list.

Also make sure your response menu panel(s) are assigned to the Menu Panels list.

If you can't assign them, make sure they have StandardUISubtitlePanel / StandardUIMenuPanel components, and check that the fields are assigned. At a minimum, the Subtitle Text field must be assigned to StandardUISubtitlePanels.

If a panel still doesn't show up when you play the conversation, try removing its Animator component if present. If this makes it appear, then you can re-add the Animator and figure out why it's prevent the panel from being visible. Check the Console log for warnings, and check the the trigger parameter names assigned under the Visibility section.

Re: Adding Dialogue UI to Dialogue Manager

Posted: Tue Feb 04, 2020 1:50 pm
by IGOR824
Hi

This is the panel for my NPC Subtitle Panel, and my PC Subtitle Panel is also assigned the same way. I tried playing the scene without the animator components attached to the subtitle panels but still ended up with the same result.

Image

This is the Standard UI Menu Panel that is attached to the Response Menu Panel.

Image

I'm fairly certain that I've set up the Dialogue UI correctly with the right assignments in each component.

Thanks for your assistance.

Re: Adding Dialogue UI to Dialogue Manager

Posted: Tue Feb 04, 2020 2:03 pm
by Tony Li
Those look perfect.

Does your dialogue UI have a main dialogue panel that contains all of the subtitle and menu panels? If so, is it assigned to the StandardDialogueUI's Conversation UI Elements > Main Panel?

Are there any errors or warnings in the Console window?

When a conversation starts, please inspect the Subtitle Text GameObjects. Do they contain the conversation text? This will tell us if their content is being set properly but they're just not becoming visible for some reason.

Also, are their GameObjects active or inactive? If they're active, then it's possible that a CanvasGroup is setting the alpha to zero, making it invisible.

Re: Adding Dialogue UI to Dialogue Manager

Posted: Tue Feb 04, 2020 2:57 pm
by IGOR824
Below is the Standard Dialogue UI. And I don't get any errors when playing the scene.

I checked the Subtitle Text that is attached to the NPC Subtitle panel and the correct conversation text is being changed when I play the scene.

When I check the scene view everything is positioned correctly, but in the Game View the objects seem to be invisible.

Image

Re: Adding Dialogue UI to Dialogue Manager

Posted: Tue Feb 04, 2020 3:10 pm
by Tony Li
The Dialogue Manager GameObject marks itself as "don't destroy on load". This allows it to survive scene changes, so it can carry variable values and quest states across scene changes, as well as handle scene transitions and saving/loading games (if you've added a SaveSystem component).

If you make your dialogue UI a child of the Dialogue Manager's Canvas, the Dialogue Manager will carry it along when it changes scenes. If you prefer, you can create an additional canvas underneath the Dialogue Manager for your dialogue UI. Splitting your UIs into different canvases is usually more efficient because each canvas has less to draw when its content changes.

Re: Adding Dialogue UI to Dialogue Manager

Posted: Tue Feb 04, 2020 3:17 pm
by IGOR824
Sorry I realized the DontDestroyOnLoad was required and edited my response too late.

I've noticed that in the Scene View the objects are being changed to the right parameters, i.e. the right game objects are being shown or not shown when the Scene is being played and the Dialogue is at the correct conversation pieces . But when I view the scene in Game View the Dialogue UI is hidden. Does this have to do with the Canvas? I've also noticed that when I preview the Scene camera the Dialogue UI isn't shown which I assume is for the problems I'm experiencing.

Re: Adding Dialogue UI to Dialogue Manager

Posted: Tue Feb 04, 2020 3:30 pm
by Tony Li
Check the Dialogue Panel and the subtitle panels for CanvasGroup components. If any of them have CanvasGroups, is the Alpha value set to zero? If so, it probably also has an Animator component that's setting the CanvasGroup's Alpha to zero. You can either remove the Animator, or set the panel's Show Trigger and Hide Trigger values to 'Show' and 'Hide'.