Page 1 of 1

Switching back and forth between multiple Dialogue UIs

Posted: Wed Jul 29, 2020 10:35 am
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!

Re: Switching back and forth between multiple Dialogue UIs

Posted: Wed Jul 29, 2020 11:15 am
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.

Re: Switching back and forth between multiple Dialogue UIs

Posted: Thu Jul 30, 2020 3:56 am
by LostTrainDude
Thanks a lot for the reply, Tony!

The second option seems to be perfect for what I have in mind :)

Re: Switching back and forth between multiple Dialogue UIs

Posted: Thu Jul 30, 2020 9:49 am
by Tony Li
Happy to help. :-)