I have scrolling text that is appended that look like the below:
"Person 1: Hello!"
"Person 2: What's up?"
What I am looking for is a way to to have the "Person 1:" and "Person 2:" Parts a different color/boldened. This would help the different conversation entries seem more distinct. Thank you!
How to have the character name a different color
Re: How to have the character name a different color
Hi,
If you want to use the same color for all actors' names, inspect the subtitle panel in your dialogue UI. Tick Add Speaker Name. Set the Add Speaker Name Format to something like:
The {0} will be replaced by the actor's name. The {1} will be replaced by the dialogue text. The [em1]...[/em1] are emphasis tags, whose appearance you can set in the Dialogue Editor's Database section.
If you prefer to use rich text codes, you can use those instead, like:
If you want to use a different color/style for each actor, leave Add Speaker Name UNticked. Instead, add a Dialogue Actor component to the actor's GameObject. If the actor doesn't have a GameObject, you can create an empty one. Set the Actor field. Then tick Set Subtitle Color and Apply Color To Prepended Name.
If you want to use the same color for all actors' names, inspect the subtitle panel in your dialogue UI. Tick Add Speaker Name. Set the Add Speaker Name Format to something like:
Code: Select all
[em1]{0}[/em1]: {1}
If you prefer to use rich text codes, you can use those instead, like:
Code: Select all
<color=red><b>{0}</b></color>: {1}
Re: How to have the character name a different color
The "[em1]{0}[/em1]: {1}" Didn't work, it just made the name display as; "[em1]Name[/em1]: Hello World!".
However, adding the "Dialogue Actor component" worked exactly how I wanted. Thank you very much!
However, adding the "Dialogue Actor component" worked exactly how I wanted. Thank you very much!
Re: How to have the character name a different color
Hmm, I'll check that the first option properly parses the [em#] tags. Anyway, I'm glad the Dialogue Actor approach met your needs!