[SOLVED] NPC different font color

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
User avatar
Vintehin
Posts: 2
Joined: Thu Dec 03, 2015 11:48 am

[SOLVED] NPC different font color

Post by Vintehin »

Hello every one !

I'm very new to unity ! I work on text adventures and visual novels, so Dialogue System is a great help for me !

Now my nooby question :

I want each NPC to have a different font color. Is there an easy way to do this and keep the same canvas for all NPC ? Or do I have to make a different DialogueUI for each NPC and use "Override Dialogue UI" component ? (I use the Unity UI Dialogue UI).

My first idea was to custom NPC informations in the "ACTORS" panel of the DIALOGUE EDITOR. But I don't know if it's possible, and if it is, I have no idea how to do this.

Hope it's clear, my english skills are not perfect (but still beter than my developper skills !)

thanks !
Last edited by Vintehin on Fri Dec 04, 2015 11:06 am, edited 1 time in total.
User avatar
Tony Li
Posts: 21721
Joined: Thu Jul 18, 2013 1:27 pm

Re: NPC different font color

Post by Tony Li »

Hi,

No need to use "Override Dialogue UI". I'll post a short script here later today. You can add it to your NPCs to set their font color.
User avatar
Tony Li
Posts: 21721
Joined: Thu Jul 18, 2013 1:27 pm

Re: NPC different font color

Post by Tony Li »

This package contains a script ActorSubtitleColor.cs: ActorSubtitleColor_2015-12-03.unitypackage that you can add using the menu item Component > Dialogue System > Actor > Actor Subtitle Color. Add the script to your NPC GameObjects and set their colors.

You can also download the package on the Dialogue System Extras page.
User avatar
Vintehin
Posts: 2
Joined: Thu Dec 03, 2015 11:48 am

Re: NPC different font color

Post by Vintehin »

Hello Tony,

I've just tried your script, It works great !! Very easy to use ! :D

Thanks a lot for this fast and perfect answer !
User avatar
Tony Li
Posts: 21721
Joined: Thu Jul 18, 2013 1:27 pm

Re: [SOLVED] NPC different font color

Post by Tony Li »

Happy to help!
Post Reply