TMP Text Compute Margin Size#
UI / Graphic / TMP Text / TMP Text Compute Margin Size
Description#
Executes the Compute Margin Size method on the TMP Text component
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 Compute Margin Size")]
[Category("UI/Graphic/TMP Text/Compute Margin Size")]
[Description("Executes the Compute Margin Size method on the TMP Text component")]
[Image(typeof(IconUIText), ColorTheme.Type.Blue)]
[Keywords("UI, User, Interface, TMP, Text, Mesh, Pro")]
[Serializable]
public class GenInstructionTMP_Text_ComputeMarginSize_0 : Instruction
{
[SerializeField] private GetGameObject m_TMP_Text = new GetGameObject(
new GenTypeGameObject_TMP_Text()
);
protected override string GetTitle(GameObject source)
{
string method = TextUtils.ThemeAsKeyword("Compute Margin Size");
return $"{this.m_TMP_Text} {method}";
}
protected override Awaitable Run(Args args)
{
TMP_Text component = this.m_TMP_Text.Get<TMP_Text>(args);
if (component == null) return Done;
component.ComputeMarginSize();
return Done;
}
}
}