Set TextMeshPro - Text (UI) Auto Size Text Container#
UI / Graphic / TextMeshPro - Text (UI) / Set TextMeshPro - Text (UI) Auto Size Text Container
Description#
Sets the Auto Size Text Container property of TextMeshPro - Text (UI) component
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("Set TextMeshPro - Text (UI) Auto Size Text Container")]
[Category("UI/Graphic/TextMeshPro - Text (UI)/Auto Size Text Container")]
[Description("Sets the Auto Size Text Container property of TextMeshPro - Text (UI) component")]
[Image(typeof(IconUIText), ColorTheme.Type.Blue)]
[Keywords("UI, User, Interface, TMP, Text, Mesh, Pro")]
[Parameter("Text Mesh Pro UGUI")]
[Parameter("Value")]
[Serializable]
public class GenInstructionBool_TextMeshProUGUI_SetAutoSizeTextContainer : Instruction
{
[SerializeField] private GetGameObject m_TextMeshProUGUI = new GetGameObject(
new GenTypeGameObject_TextMeshProUGUI()
);
[SerializeField] private GetBool m_Value = new GetBool();
protected override string GetTitle(GameObject source)
{
string member = TextUtils.ThemeAsKeyword("Auto Size Text Container");
return $"{this.m_TextMeshProUGUI} {member} = {this.m_Value}";
}
protected override Awaitable Run(Args args)
{
TextMeshProUGUI component = this.m_TextMeshProUGUI.Get<TextMeshProUGUI>(args);
if (component == null) return Done;
component.autoSizeTextContainer = (bool) this.m_Value.Get(args);
return Done;
}
}
}