Switching between two dialogue ui
Switching between two dialogue ui
I believe there is somewhere such topic, but i couldn't find it. I want to make two completely different dialogue ui. One of them is for ordinary events (it's just window with text and menu) and another one is more complex for real dialogs with character pictures and camera movement (as in Banner Saga). I don't how to switch them depending on specific conversation which trigger it.
I suppose it has something to do with OverrideDisplaySettings, but im not shure how to use it to achieve my goals
I suppose it has something to do with OverrideDisplaySettings, but im not shure how to use it to achieve my goals
Re: Switching between two dialogue ui
Hi,
You can use an Override Dialogue UI component. Add it to a character, and assign a dialogue UI. If either primary participant in a conversation has an Override Dialogue UI component, the conversation will use the Override Dialogue UI's dialogue UI instead of the default one that was assigned to the Dialogue Manager GameObject's Display Settings > Dialogue UI.
More info about participants: Character GameObject Assignments
I suggest assigning your more complex dialogue UI to the Dialogue Manager's Display Settings > Dialogue UI component.
Then create an empty GameObject for an "Events" actor that you can use in your ordinary event conversations. Add an Override Dialogue UI to it, and assign your simple text + menu dialogue UI to it. Add a Dialogue Actor component to your Events GameObject, and set the Actor dropdown to Events.
You can use an Override Dialogue UI component. Add it to a character, and assign a dialogue UI. If either primary participant in a conversation has an Override Dialogue UI component, the conversation will use the Override Dialogue UI's dialogue UI instead of the default one that was assigned to the Dialogue Manager GameObject's Display Settings > Dialogue UI.
More info about participants: Character GameObject Assignments
I suggest assigning your more complex dialogue UI to the Dialogue Manager's Display Settings > Dialogue UI component.
Then create an empty GameObject for an "Events" actor that you can use in your ordinary event conversations. Add an Override Dialogue UI to it, and assign your simple text + menu dialogue UI to it. Add a Dialogue Actor component to your Events GameObject, and set the Actor dropdown to Events.
Re: Switching between two dialogue ui
Thanks, it helped a lot. By the way i also wonder can i change dialog ui right in the middle of dialog in depending on who speaking?
Re: Switching between two dialogue ui
It's probably best to use different subtitle panels in that case. But, yes, it is possible to change dialogue UIs. Assign a different UI to the C# property DialogueManager.conversationView.dialogueUI. The easiest way to use different subtitle panels is to add a Dialogue Actor component to the character's GameObject and set Dialogue UI Settings > Subtitle Panel Number.
Re: Switching between two dialogue ui
I'm calling Dialogue Manager.conversationView.dialogue UI = newDialogueUI; by Lua when reaching required Dialogue Entry and the old DialogueUI disappearing, but new one doesn't show up. Should i write something else?
Re: Switching between two dialogue ui
Are there any errors or warnings in the Console window?
If you check the new UI's subtitle text, does it contain the dialogue entry's text?
If you check the new UI's subtitle text, does it contain the dialogue entry's text?
Re: Switching between two dialogue ui
There is a Dialog Entry where i call TestChangeUI() { DialogueManager.conversationView.dialogueUI = testDialogueUI;}
And actor - Result which i bind to new Dialogue UI
And when i reaching Dialog Entry where actor is Result and old DialogueUi disappeared and i getting this in console
Рассказчик, Барсег and Result are actors in this conversation.
Any way, you suggested me to change subtitles panel, but there is also some custom panels and menu panels that need to be changed. So if i need completely change the view i suppose i should change whole dialogue UI. Or i don't understand something wrong?
And actor - Result which i bind to new Dialogue UI
And when i reaching Dialog Entry where actor is Result and old DialogueUi disappeared and i getting this in console
Рассказчик, Барсег and Result are actors in this conversation.
Any way, you suggested me to change subtitles panel, but there is also some custom panels and menu panels that need to be changed. So if i need completely change the view i suppose i should change whole dialogue UI. Or i don't understand something wrong?
- Attachments
-
- Screenshot 2024-03-19 230741.png (21.96 KiB) Viewed 728 times
-
- Screenshot 2024-03-19 230727.png (48.98 KiB) Viewed 728 times
-
- Screenshot 2024-03-19 230649.png (27.16 KiB) Viewed 728 times
Re: Switching between two dialogue ui
Here's an example:
DS_ChangeDialogueUIExample_2024-03-19.unitypackage
I just used the SendMessage() sequencer command, but that shouldn't make a difference from using a custom sequencer command or Lua function.
DS_ChangeDialogueUIExample_2024-03-19.unitypackage
I just used the SendMessage() sequencer command, but that shouldn't make a difference from using a custom sequencer command or Lua function.
Re: Switching between two dialogue ui
Thank you) It works now. My mistake was that i was trying to activate new ui that was just prefab, but i had to put it in canvas in dialog manager as an gameobject already.
Re: Switching between two dialogue ui
Hi,
Yes, that's something I should have made clearer. If you assign a prefab to the Dialogue Manager's Display Settings > Dialogue UI field, the Dialogue Manager will instantiate it when it starts up. But if you just assign conversationView.dialogueUI it won't instantiate a prefab.
Yes, that's something I should have made clearer. If you assign a prefab to the Dialogue Manager's Display Settings > Dialogue UI field, the Dialogue Manager will instantiate it when it starts up. But if you just assign conversationView.dialogueUI it won't instantiate a prefab.