Switching back and forth between multiple Dialogue UIs

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
LostTrainDude
Posts: 61
Joined: Wed Mar 21, 2018 2:14 pm

Switching back and forth between multiple Dialogue UIs

Post by LostTrainDude »

Hello!

I was wondering: is there a best approach to using multiple Dialogue UIs?

Let's say some conversations between two characters would sport an overhead, almost bark-like Speech Bubble UI, while others would include a more "default" one, with actual Response Menu and multiple choices available.

Is there a way to easily set two different Dialogue UIs and arbitrarily switch between them?

I am looking at the Override components for Actors but I'm not sure that's the best way, since I may have the same characters having both types of conversations in different moments of the game.

Two possible solutions I have thought of:
  • Having both Dialogue UIs instantiated as children to the main Dialogue Manager Canvas and switch them through script at runtime
  • Just swap the involved Actor's Override UI GameObject at runtime when either Dialogue UI have to be enabled
Thanks in advance!
User avatar
Tony Li
Posts: 21061
Joined: Thu Jul 18, 2013 1:27 pm

Re: Switching back and forth between multiple Dialogue UIs

Post by Tony Li »

Hi,

You can set the priority values of different Override Dialogue UI components on the actors. The conversation will use the Override Dialogue UI with the highest priority.

And/or you can add different subtitle panels to the main dialogue UI. Use the [panel=#] markup tag or SetPanel() sequencer command to tell an actor to use different panels. The [panel=#] tag tells the actor to use a different panel for a single line. The SetPanel() sequencer command sets it for the rest of the conversation.
LostTrainDude
Posts: 61
Joined: Wed Mar 21, 2018 2:14 pm

Re: Switching back and forth between multiple Dialogue UIs

Post by LostTrainDude »

Thanks a lot for the reply, Tony!

The second option seems to be perfect for what I have in mind :)
User avatar
Tony Li
Posts: 21061
Joined: Thu Jul 18, 2013 1:27 pm

Re: Switching back and forth between multiple Dialogue UIs

Post by Tony Li »

Happy to help. :-)
Post Reply