Disabling Dialogue System Text color overrides

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
patxiku
Posts: 14
Joined: Tue Nov 07, 2017 6:46 am

Disabling Dialogue System Text color overrides

Post by patxiku »

Hi, I'm trying to make a dynamic color texts on my game but Dyalogue system keeps overriding text colors.
How can I disable this?
I'm changing color property from my NPC Subtitle Line Text property but in a milisecond Dyalogue System overrides it.
Thanks in advance.
User avatar
Tony Li
Posts: 22062
Joined: Thu Jul 18, 2013 1:27 pm

Re: Disabling Dialogue System Text color overrides

Post by Tony Li »

Hi,

How are you changing the color?

Can you use [em] tags or rich text codes? For example:
  • Dialogue Text: "<color=red>This is red text.</color>"
If you're talking about response buttons, inspect the response button and untick the option to set the label color.
patxiku
Posts: 14
Joined: Tue Nov 07, 2017 6:46 am

Re: Disabling Dialogue System Text color overrides

Post by patxiku »

I'm changing the Text component references values as follows:

Code: Select all

reference = GetComponent<Text>();
reference.color = overrideColor;
reference.font = overrideFont;
reference.fontSize = overrideSize;
It seems to be overrited each frame by the dialogue system itself, since I have no other style changes.
Edit: I can't change the text itself to add tags since it'd be counterporductive.
patxiku
Posts: 14
Joined: Tue Nov 07, 2017 6:46 am

Re: Disabling Dialogue System Text color overrides

Post by patxiku »

Nevermind, I created a new class that inhertis from "UnityUIDialogueUI" and overrided the ShowDialogue Function so it overrides the dialogue style too.
That seems to have fixed it :lol:
Thanks!
Post Reply