TMP Text Rich Text#
UI / Graphic / TMP Text / TMP Text Rich Text
Description#
Compares the Rich Text property of TMP Text component to another value
Parameters#
| Name | Description |
|---|---|
| TMP Text |
Code#
// <auto-generated>
// This script was automatically generated using the Visual Script Transpiler.
// Do not modify. Changes to this file will be lost when updating the package.
// </auto-generated>
using System;
using UnityEngine;
using VisualScript.Icons;
using UnityEngine.UI;
using TMPro;
namespace VisualScript.Runtime
{
[Title("TMP Text Rich Text")]
[Category("UI/Graphic/TMP Text/Rich Text")]
[Description("Compares the Rich Text property of TMP Text component to another value")]
[Image(typeof(IconUIText), ColorTheme.Type.Blue)]
[Keywords("UI, User, Interface, TMP, Text, Mesh, Pro")]
[Parameter("TMP Text")]
[Serializable]
public class GenConditionBool_TMP_Text_CheckRichText : Condition
{
[SerializeField] private GetGameObject m_TMP_Text = new GetGameObject(
new GenTypeGameObject_TMP_Text()
);
protected override string GetTitle(GameObject source)
{
string member = TextUtils.ThemeAsKeyword("Rich Text");
return $"{this.m_TMP_Text} {member}";
}
protected override bool Run(Args args)
{
TMP_Text component = this.m_TMP_Text.Get<TMP_Text>(args);
if (component == null) return false;
return component.richText;
}
}
}