Hi pixel, this asset is great. Everything works fine.
I have 2 Dialogue Ui in my scene, the main panel and the small one, like this the attachment. I want to switch the dialogue UI at runtime. How can I achieve this? Thanks!
change the UI Panel from multi-panels
-
- Posts: 2
- Joined: Thu Jul 08, 2021 12:06 am
change the UI Panel from multi-panels
- Attachments
-
- Untitled.png (9.4 KiB) Viewed 230 times
Re: change the UI Panel from multi-panels
Hi,
That image looks like it would work well as two separate subtitle panels in the same dialogue UI. For a somewhat similar example, examine the Basic Standard Dialogue UI. It has two separate subtitle panels: NPC Subtitle Panel and PC Subtitle Panel.
If it would work in your case to implement them as two subtitle panels in the same dialogue UI, assign both to the StandardDialogueUI component's Conversation UI Elements > Subtitle Panels list. Each will have an element number (0, 1, etc.).
There are three ways to tell a subtitle to use a specific subtitle panel:
There are also corresponding ways to specify which response menu panel to use.
---
If you can't use separate subtitle panels in the same dialogue UI for some reason, then set up the panels in separate dialogue UIs (i.e., with separate StandardDialogueUI components). Assign the default dialogue UI to the Dialogue Manager GameObject's Display Settings > Dialogue UI field. When you want to use the other dialogue UI, add an Override Dialogue UI component to a character's GameObject, and assign the other dialogue UI to it. Conversations involving that character will use the other UI.
That image looks like it would work well as two separate subtitle panels in the same dialogue UI. For a somewhat similar example, examine the Basic Standard Dialogue UI. It has two separate subtitle panels: NPC Subtitle Panel and PC Subtitle Panel.
If it would work in your case to implement them as two subtitle panels in the same dialogue UI, assign both to the StandardDialogueUI component's Conversation UI Elements > Subtitle Panels list. Each will have an element number (0, 1, etc.).
There are three ways to tell a subtitle to use a specific subtitle panel:
- Add a Dialogue Actor component to a participating character's GameObject, and set its Dialogue UI Settings > Subtitle Panel Number. That participant will use the specified panel.
- Or add a [panel=#] markup tag to a dialogue entry node's text to use a panel for that node.
- Or use the SetPanel() sequencer command to tell an actor to use a panel for the remainder of the conversation.
There are also corresponding ways to specify which response menu panel to use.
---
If you can't use separate subtitle panels in the same dialogue UI for some reason, then set up the panels in separate dialogue UIs (i.e., with separate StandardDialogueUI components). Assign the default dialogue UI to the Dialogue Manager GameObject's Display Settings > Dialogue UI field. When you want to use the other dialogue UI, add an Override Dialogue UI component to a character's GameObject, and assign the other dialogue UI to it. Conversations involving that character will use the other UI.
-
- Posts: 2
- Joined: Thu Jul 08, 2021 12:06 am
Re: change the UI Panel from multi-panels
thanks for replying!
I exactly want the separate 2 Dialogue UI. Meanwhile, I can change the Dialogue Ui in the code. I will try the Override Dialogue UI Component now!
I exactly want the separate 2 Dialogue UI. Meanwhile, I can change the Dialogue Ui in the code. I will try the Override Dialogue UI Component now!
Re: change the UI Panel from multi-panels
Sounds good! Glad to help.