Page 1 of 1

Change Dialogue UI

Posted: Tue Jul 06, 2021 9:47 pm
by Kamotachi
Hi!
I was trying to change the DialogueUI but ... I can't. :roll:

I've a DialogueSystem with two diferent DialogueUI as childrens (One of them is disabled). One is the Jrpg template, and the other one it's personalized.

I need :

-Start a conversation with the JrpgTemplate. (There's no problem)
-When conversation is finished, load another level.
- In the new Scene, swap the DialogueUI (Jrpg to personalized) and then a DialogueSystemTrigger starts a new conversation in this scene with the personalized DialogueUI.

I'm thinking on create a new script, and make something in the Start method... like:

// change DialogueUI from Jrpg to personalized; <-- How?
DialogueSystemTrigger.OnUse();

That's all, thanks!

Re: Change Dialogue UI

Posted: Wed Jul 07, 2021 8:22 am
by Tony Li
Hi,

Here are a couple of ways to accomplish that:

1. Don't add the personalized dialogue UI to the Dialogue Manager. Instead, make it a prefab. Add an Override Dialogue UI component to the NPC that will use the personalized dialogue UI, and assign the prefab. Conversations involving this NPC will use the personalized UI.

2. Or call DialogueManager.UseDialogueUI(yourPersonalizedUI) in C#.

Re: Change Dialogue UI

Posted: Wed Jul 07, 2021 4:47 pm
by Kamotachi
Nice!

Thanks! You are awesome! :D
Solved!

Re: Change Dialogue UI

Posted: Wed Jul 07, 2021 5:06 pm
by Tony Li
Glad to help! :-)