Runtime overide dialog UI changes with multiple gameobject?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
JasonDev
Posts: 4
Joined: Sun Dec 25, 2022 1:23 pm

Runtime overide dialog UI changes with multiple gameobject?

Post by JasonDev »

I have a couple GameObject in one scene related with dialog system, each with dialog actor corresponding to the identity of the person.
Cutscene 1 (conversation 1)
Person 1
Person 2
Person 3

Cutscene 2 (conversation 2)
Person 2
Person 3
Person 4

Each person have a dialog actor and sometimes for example I want to change the UI that is being used for Person 3 only but only on Cutscene 1. So I seperate the objects. But when I add the ovverride dialog UI it doesn't seem to work properly. Do I need to manually change the actor conversation before to have the desired result?

And this requires custom lua scripts? Because I can't seem to find any build in method. How does the dialog system change the actor on runtime? Even when I disable cutscene 2, the dialog don't seem to be changing the actor gameobject?
User avatar
Tony Li
Posts: 22143
Joined: Thu Jul 18, 2013 1:27 pm

Re: Runtime overide dialog UI changes with multiple gameobject?

Post by Tony Li »

Hi,

The Override Dialogue UI component will tell the Dialogue System to use an entirely different dialogue UI. A dialogue UI consists of subtitle panels and menu panels which may be used by multiple actors. For example, unless you have overridden the regular behavior, NPC actors will generally use the dialogue UI's subtitle panel 0, and player actors will use subtitle panel 1.

A conversation can use only one dialogue UI at a time.

When a conversation starts, it will check the primary actor and conversant GameObjects for Override Dialogue UI components. (See Character GameObject Assignments for info about primary actor/conversant.) If either GameObject has an Override Dialogue UI component, the conversation will use the Override Dialogue UI component with the highest Priority value.

It is also possible to add a Dialogue Actor to an actor's GameObject to tell that actor to use a different subtitle panel. This can be a panel in the dialogue UI, or it can be a separate, custom subtitle panel (such as an overhead text bubble) that is not part of the dialogue UI.

You can change the Dialogue Actor's Dialogue UI Settings > Subtitle Panel Number at runtime before starting a conversation -- for example, changing it from panel 0 to panel 2 before starting Cutscene 2, or changing it to Custom and assigning a different separate overhead bubble subtitle panel before starting Cutscene 2.
Post Reply