TMP Text Force Mesh Update#
UI / Graphic / TMP Text / TMP Text Force Mesh Update
Description#
Executes the Force Mesh Update method on the TMP Text component
Parameters#
| Name | Description |
|---|---|
| Ignore Active State | |
| Force Text Reparsing |
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 Force Mesh Update")]
[Category("UI/Graphic/TMP Text/Force Mesh Update")]
[Description("Executes the Force Mesh Update method on the TMP Text component")]
[Image(typeof(IconUIText), ColorTheme.Type.Blue)]
[Keywords("UI, User, Interface, TMP, Text, Mesh, Pro")]
[Parameter("Ignore Active State")]
[Parameter("Force Text Reparsing")]
[Serializable]
public class GenInstructionTMP_Text_ForceMeshUpdate_2 : Instruction
{
[SerializeField] private GetGameObject m_TMP_Text = new GetGameObject(
new GenTypeGameObject_TMP_Text()
);
[SerializeField] private GetBool m_IgnoreActiveState = new GetBool();
[SerializeField] private GetBool m_ForceTextReparsing = new GetBool();
protected override string GetTitle(GameObject source)
{
string method = TextUtils.ThemeAsKeyword("Force Mesh Update");
return $"{this.m_TMP_Text} {method} ({this.m_IgnoreActiveState}, {this.m_ForceTextReparsing})";
}
protected override Awaitable Run(Args args)
{
TMP_Text component = this.m_TMP_Text.Get<TMP_Text>(args);
if (component == null) return Done;
component.ForceMeshUpdate(
(bool) this.m_IgnoreActiveState.Get(args),
(bool) this.m_ForceTextReparsing.Get(args)
);
return Done;
}
}
}