TextMeshPro - Text (UI) Canvas Renderer#
UI / Graphic / TextMeshPro - Text (UI) / TextMeshPro - Text (UI) Canvas Renderer
Description#
Compares the Canvas Renderer property of TextMeshPro - Text (UI) component to another value
Parameters#
| Name | Description |
|---|---|
| Text Mesh Pro UGUI | |
| Value |
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("TextMeshPro - Text (UI) Canvas Renderer")]
[Category("UI/Graphic/TextMeshPro - Text (UI)/Canvas Renderer")]
[Description("Compares the Canvas Renderer property of TextMeshPro - Text (UI) component to another value")]
[Image(typeof(IconUIText), ColorTheme.Type.Blue)]
[Keywords("UI, User, Interface, TMP, Text, Mesh, Pro")]
[Parameter("Text Mesh Pro UGUI")]
[Parameter("Value")]
[Serializable]
public class GenConditionGameObject_TextMeshProUGUI_CheckCanvasRenderer : Condition
{
[SerializeField] private GetGameObject m_TextMeshProUGUI = new GetGameObject(
new GenTypeGameObject_TextMeshProUGUI()
);
[SerializeField] private GetGameObject m_Value = new GetGameObject();
protected override string GetTitle(GameObject source)
{
string member = TextUtils.ThemeAsKeyword("Canvas Renderer");
return $"{this.m_TextMeshProUGUI} {member} = {this.m_Value}";
}
protected override bool Run(Args args)
{
TextMeshProUGUI component = this.m_TextMeshProUGUI.Get<TextMeshProUGUI>(args);
if (component == null) return false;
return component.canvasRenderer == this.m_Value.Get<CanvasRenderer>(args);
}
}
}