Add Name to legend of text

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
GenesisEnd
Posts: 5
Joined: Fri Mar 17, 2023 3:29 pm

Add Name to legend of text

Post by GenesisEnd »

Hello Tony,

We would like to add the names of the actors near the text that has been said and also add some spacing between the text. Is that possible with the current Dialogue system?

(red lines are actor names and green lines are paragraphs)
Image
User avatar
Tony Li
Posts: 22100
Joined: Thu Jul 18, 2013 1:27 pm

Re: Add Name to legend of text

Post by Tony Li »

Hi,

The simple solution is to inspect the subtitle panel's StandardUISubtitlePanel component. Tick Add Speaker Name, and set Speaker Name Format to something like:

Code: Select all

\n<color=red>{0}</color>\n{1}
The "\n" indicates a line break.

{0} is the actor name and {1} is the dialogue text.

<color=red>{0}</color> colors the actor name red. If you prefer to have unique colors for each character, remove the color tags from the Speaker Name Format, and add them to the actor's Display Name.


If you only want to show actor names when a new actor is speaking, you'll need to do a little scripting. From your screenshot I don't think this is the case, but I thought I'd mention it.
GenesisEnd
Posts: 5
Joined: Fri Mar 17, 2023 3:29 pm

Re: Add Name to legend of text

Post by GenesisEnd »

Amazing! thanks a lot! that did the trick!
User avatar
Tony Li
Posts: 22100
Joined: Thu Jul 18, 2013 1:27 pm

Re: Add Name to legend of text

Post by Tony Li »

Happy to help!
Post Reply