Change color of Subtitle text and actor name text based on actor

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Ekta Bhutwala
Posts: 40
Joined: Mon Sep 05, 2022 5:40 am

Change color of Subtitle text and actor name text based on actor

Post by Ekta Bhutwala »

Hii

I want to change color of subtitle text and actor name text based on actor.
If i have 4 actors in single database then based on actor in dialog, conversation text color should be displayed.

How to do that?

Thanks.
User avatar
Tony Li
Posts: 22143
Joined: Thu Jul 18, 2013 1:27 pm

Re: Change color of Subtitle text and actor name text based on actor

Post by Tony Li »

Hi,

If you add a Dialogue Actor component to an actor's GameObject, you can tick "Set Subtitle Color" to color the dialogue text.

If you want to color the actor's Portrait Name, inspect the actor in the Dialogue Editor window. Tick Use Display Name, and set the Display Name to the name with a rich text color code such as:
  • Display Name: "<color=green>The Green Yamo</color>"
Ekta Bhutwala
Posts: 40
Joined: Mon Sep 05, 2022 5:40 am

Re: Change color of Subtitle text and actor name text based on actor

Post by Ekta Bhutwala »

Hii

It's not working even when conversation set to start with actor2 then also actor1 name is coming.

Means speaking actor image and name is not coming correctly. Dialog text is correct.
User avatar
Tony Li
Posts: 22143
Joined: Thu Jul 18, 2013 1:27 pm

Re: Change color of Subtitle text and actor name text based on actor

Post by Tony Li »

Here's an example scene:

DS_ColorNameAndTextExample_2022-09-15.unitypackage

Make sure you have assigned the actors correctly in the conversation (in the Dialogue Editor) and in the Dialogue System Trigger component's Actions > Start Conversation > Conversation Actor and Conversation Conversant.
Post Reply