Change Dialogue UI

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Kamotachi
Posts: 44
Joined: Fri Nov 29, 2019 9:03 pm

Change Dialogue UI

Post 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!
User avatar
Tony Li
Posts: 21678
Joined: Thu Jul 18, 2013 1:27 pm

Re: Change Dialogue UI

Post 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#.
Kamotachi
Posts: 44
Joined: Fri Nov 29, 2019 9:03 pm

Re: Change Dialogue UI

Post by Kamotachi »

Nice!

Thanks! You are awesome! :D
Solved!
User avatar
Tony Li
Posts: 21678
Joined: Thu Jul 18, 2013 1:27 pm

Re: Change Dialogue UI

Post by Tony Li »

Glad to help! :-)
Post Reply