Dialogue Panel Event

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
bmringo
Posts: 11
Joined: Tue May 27, 2025 9:02 am

Dialogue Panel Event

Post by bmringo »

Hi,

I have a ScreenBlur game object outside of Canvas which will blur everything including any canvas use Camera Render Mode, the only one will not be blurred is Dialogue System Canvas which use Overlay Mode.

I need to show/hide ScreenBlur whenever the Dialogue Panel is active/inactive, not just at conversation start/end.

In the Sequencer, I'm using SetDialoguePanel(true|false) and using the Open|Close events in Dialogue Panel to Show|Hide the Screen Blur. This works well except for one issue.

Every time I start the game, the Open event fires instantly, making the Screen Blur active even though no conversation has started yet.

Is this expected behavior? I tried to set Dialogue Panel's UI Panel script Start State to Closed but it doesn't work, is my method wrong somewhere?
User avatar
Tony Li
Posts: 23254
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue Panel Event

Post by Tony Li »

Hi,

Try setting the Dialogue Manager's Other Settings > Warm Up Conversation Controller to Off.

When this dropdown is set to On or Extra, it simulates a conversation as soon as it starts, but it hides it by temporarily adding a Canvas Group with Alpha = 0 to the dialogue UI. This warm-up process lets Unity UI do a relayout of the canvas ahead of time so it doesn't need to take time to do it when the conversation actual conversation starts. It's usually not necessary, though.
bmringo
Posts: 11
Joined: Tue May 27, 2025 9:02 am

Re: Dialogue Panel Event

Post by bmringo »

Wow, thanks for the quick reply!

I have a couple of follow-up questions:

1. Tutorial Conversation Mode:

In this mode, I want to hide everything related to the dialogue system, but keep the conversation technically ongoing, so the player can click on a highlighted UI target (like a tutorial button).

To achieve this, I created a custom sequencer command ShowUnmask(buttonObjectName), which shows an overlay that blocks everything on screen except the specified button. When the button is clicked, it sends Sequencer.Message(TutorialClicked).

I'm currently using this sequence:
`SetDialoguePanel(false); ShowUnmask("Red Button"); SetDialoguePanel(true)@Message(TutorialClick);`

- I have "Deactivate On Hidden" enabled for both the Dialogue Panel and all Subtitle Panels.
- Using SetDialoguePanel(false) does hide everything as intended.

My question:
- Am I doing this correctly? It seems to work for the tutorial case, but it causes problems in the next scenario (#2).

2. Normal Visual Novel Conversation:

In this mode, there's a toggle that hides most UI elements in the scene, except for the Portrait and Background. However:

Because of the setup in #1, calling DialogueManager.Instance.SetDialoguePanel(false) also hides the Portraits, which I want to keep visible.

If I try to enable/disable the Dialogue Panel directly instead, the Canvas Group’s alpha remains at 0 after disabling, even though the object is re-enabled — the panel stays invisible.

Extra context:
To avoid the Dialogue Panel's Canvas Group animation affecting the Portraits, I placed the Portrait Panels (which hold all the Subtitle Panels for character portraits) as siblings of the Dialogue Panel in the hierarchy.

My question:
- How should I set up the Dialogue and Portrait Panels properly to support both cases without conflict?
- Also, for the tutorial case, there is no background UI used for conversations. But for normal visual novel-style conversations, there is usually a Background shown. Where should I place the Background in the hierarchy, so it works properly for both cases and doesn’t conflict with hiding/showing logic? Is there any built-in method to control the background, or do I need to implement that separately?

Thanks again for your help!
User avatar
Tony Li
Posts: 23254
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue Panel Event

Post by Tony Li »

Hi,

You could write a custom sequencer command to handle this or use child Canvases and disable them as needed. For the latter, you could set up your dialogue UI hierarchy something like this:

vnCanvases.png
vnCanvases.png (19.9 KiB) Viewed 547 times

Add Canvas components to PortraitsCanvas and DialoguePanelCanvas. These will be nested Canvases inside the main DialogueCanvas. Add a GraphicRaycaster component to the DialoguePanelCanvas so it can receive mouse clicks.

To hide everything, use this sequencer command:

Code: Select all

SetEnabled(Canvas, false, DialogueCanvas)
To show everything again:

Code: Select all

SetEnabled(Canvas, true, DialogueCanvas)
To hide only the text panel but keep the portraits visible:

Code: Select all

SetEnabled(Canvas, false, DialoguePanelCanvas)

If you don't want to have to type all of that every time, you can add a SequencerShortcuts component to the Dialogue Manager, like this:

sequencerShortcuts.png
sequencerShortcuts.png (77.8 KiB) Viewed 547 times

Then you can use sequencer commands such as this to hide the text panel:

Code: Select all

{{HideText}}
bmringo
Posts: 11
Joined: Tue May 27, 2025 9:02 am

Re: Dialogue Panel Event

Post by bmringo »

Thank for your reply,

Where can I check the script for sequencer "SetEnabled" and "SetDialoguePanel"?

I want to make the custom sequencer following similar to your structure, but I couldn't find them folder Commands.
User avatar
Tony Li
Posts: 23254
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue Panel Event

Post by Tony Li »

The built-in commands such as SetEnabled() and SetDialoguePanel() that are able to finish immediately (instead of over time such as the Delay() command) are in Sequencer.cs. Search for "HandleSetEnabbledInternally" and "HandleSetDialoguePanelInternally" in the script.
Post Reply