Hello,
I would like to use the emphasis tags to change the colors of my response options (for example gold for main story line, red for special events). The colors I would like to achieve are using the TMP color gradients. What would be the easiest way to achieve this?
Thank you very much in advance
Emphasis TMP Color Gradient
Re: Emphasis TMP Color Gradient
Hi,
Emphasis tags don't support color gradients. Instead, apply TMP tags. You can process them in an OnConversationResponseMenu(Response[]) method in a script on the Dialogue Manager. Rough example:
Emphasis tags don't support color gradients. Instead, apply TMP tags. You can process them in an OnConversationResponseMenu(Response[]) method in a script on the Dialogue Manager. Rough example:
Code: Select all
void OnConversationResponseMenu(Response[] responses)
{
foreach (var response in responses)
{
if (response.formattedText.text.StartsWith("[gold]")
{
response.formattedText.text = response.formattedText.text.Substring("[gold]".Length); // remove the custom tag
response.formattedText.text = $"<gradient="Gold">{response.formattedText.text}</color>";
}
}
}