Page 1 of 2

assign different text panel to actors

Posted: Wed Jul 28, 2021 5:00 pm
by gblekkenhorst
In our game, we'd like to assign a different Text Panel image to each actor- the background of the dialogue text, in addition to the subtitle portrait image. Is there a way to do this? If it's in the Dialogue Actor script options i'm not understanding it. Thank you!

Re: assign different text panel to actors

Posted: Wed Jul 28, 2021 5:11 pm
by Tony Li
Hi,

Each Text Panel will be a subtitle panel in your dialogue UI.

If you look at the Basic Standard Dialogue UI prefab, it has two subtitle panels: NPC Subtitle Panel and PC Subtitle Panel. They're both assigned to the dialogue UI's Standard Dialogue UI component > Conversation UI Elements > Subtitle Panels list, each with a number (0 and 1).

Similarly, the VN Template Standard Dialogue UI has three subtitle panels (0, 1, and 2). Panel 2 is generally for an extra NPC. It has a portrait image in the middle-right of the UI.

The VN Template is slightly different from what you're looking for in that all of the panels share the same text box even though they have different portrait images. I recommend starting from the Basic Standard Dialogue UI, which has unique text boxes + portrait images for each panel.

In your own dialogue UI, set up however many subtitle panels you need, and assign them to the dialogue UI's Subtitle Panels list. Make a note of each panel's number.

Then add a Dialogue Actor component to each character's GameObject. If the character doesn't have a GameObject, you can create an empty GameObject for it. Select the character's actor in the Actor dropdown. Then set Dialogue UI Settings > Subtitle Panel Number to the subtitle panel that you'd like it to use.

Note that each subtitle panel has a Visibility dropdown with different values. For example, "Always From Start" will show the panel as soon as the conversation starts. "Only During Content," on the other hand, will only show the panel while the character is showing a subtitle in it. As soon as that subtitle is done, the panel will close.

Re: assign different text panel to actors

Posted: Wed Jul 28, 2021 7:21 pm
by gblekkenhorst
Thank you that worked!

Re: assign different text panel to actors

Posted: Wed Jul 28, 2021 8:41 pm
by Tony Li
Glad to help! :-)

Re: assign different text panel to actors

Posted: Fri Jul 30, 2021 4:43 pm
by gblekkenhorst
I ran into another issue - When I implement this, my conversations stop at a certain point, seems to be after the second dialogue node of a conversation. Do you have any advice

Image

Image

Image

Re: assign different text panel to actors

Posted: Fri Jul 30, 2021 4:51 pm
by Tony Li
Hi,

Temporarily set the Dialogue Manager's Other Settings > Debug Level to Info. Then play the scene and reproduce the issue. This will log detailed information to the Console window. It may help you identify what's going on.

Have you set the Dialogue Manager's Subtitle Settings > Continue Button dropdown to a mode that will wait for a continue button click?

Is the second node's Sequence waiting for something to happen?

Re: assign different text panel to actors

Posted: Tue Aug 03, 2021 5:24 pm
by gblekkenhorst
I checked the debug, it doesn't look like it's doing anything differently then it did in the previous conversation. After some experimentation I've discovered it's not two nodes in, it's actually when the nodes change mid conversation. For example:

Conversation 1: Caption panel all the way through, no errors.
Conversation 2: Reporter panel for first node, fine. I can have as many reporter nodes as I like. Caption panel for the second node- about 30 characters print, then the continue button and subtitle text are deactivated and the subtitle text is wiped.

There are no sequencer commands in between these two nodes. The continue button is set to 'always'.

Image

(eta: to be clear there is a different conversation in which the subtitle panel switches from npc to player and does the same thing, so it's not anything about the reporter or caption box specifically.)

Re: assign different text panel to actors

Posted: Tue Aug 03, 2021 7:17 pm
by Tony Li
It sounds like to subtitle panels are sharing the same Subtitle Text GameObject (which is fine), but the outgoing panel is issuing a "Hide" animation while the new panel issues a "Show" animation.

There are several ways to address this depending on how your UI is set up. Here are some options:
  • Set the subtitle panels' Visibility to Always Once Shown or Always From Start.
  • Tick the panels' 'Wait For Close' and untick 'Clear Text On Close'.
  • Remove the panels' Animator components.

Re: assign different text panel to actors

Posted: Thu Aug 05, 2021 1:45 pm
by gblekkenhorst
Assigning a custom subtitle text to each box actually works better for us anyway, since our text boxes have slightly different shapes. This stopped the text from cutting out, but now I have an issue where when it switches text boxes in a single conversation there is no continue button, so the conversation get's stuck on that panel.

Thank you so much for all your help!

Re: assign different text panel to actors

Posted: Thu Aug 05, 2021 2:26 pm
by Tony Li
Hi,

Is the conversation waiting for the player to click a continue button, but the panel doesn't have a continue button?

If so, you can either add a continue button to the panel (and assign it to its StandardUISubtitlePanel component's Continue Button field), or you can make the dialogue entry node automatically continue without a continue button click.

To make it automatically continue, use the Continue() sequencer command in the Sequence field. For example, to continue after a duration based on the text length:

Code: Select all

Continue()@{{end}};
{{default}}
The first line simulates a continue button click. The second line includes the Dialogue Manager's Default Sequence into this sequence.