Can I change the color of the portrait name per actor?
Posted: Fri Jun 07, 2019 9:44 pm
Just like the actor subtitles, I'd like to change the color of the portrait name depending on who's speaking. Is this possible?
Support and discussion forum for Pixel Crushers products
https://www.pixelcrushers.com:443/phpbb/
https://www.pixelcrushers.com:443/phpbb/viewtopic.php?t=2331
Code: Select all
public class MySubtitlePanel : StandardUISubtitlePanel
{
public override void SetContent(Subtitle subtitle)
{
base.SetContent(subtitle);
portraitName.color = //<-- ASSIGN YOUR COLOR HERE.
}
}
Code: Select all
public Text portraitName; //<-- ASSIGN FROM DIALOGUE UI.
void OnConversationLine(Subtitle subtitle)
{
portraitName.color = //<-- ASSIGN YOUR COLOR HERE.
}
Code: Select all
var actor = DialogueManager.GetActor(subtitle.speakerInfo.nameInDatabase);
portraitName.color = Tools.WebColor(actor.LookupValue("PortraitNameColor"));