TextMeshPro - Text (UI) On Pre Render Text#
UI / Graphic / TextMeshPro - Text (UI) / TextMeshPro - Text (UI) On Pre Render Text
Description#
Executes whenever the On Pre Render Text event of TextMeshPro - Text (UI) component is invoked
Parameters#
| Name | Description |
|---|---|
| Source |
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) On Pre Render Text")]
[Category("UI/Graphic/TextMeshPro - Text (UI)/On Pre Render Text")]
[Description("Executes whenever the On Pre Render Text event of TextMeshPro - Text (UI) component is invoked")]
[Image(typeof(IconUIText), ColorTheme.Type.Blue)]
[Keywords("UI, User, Interface, TMP, Text, Mesh, Pro")]
[Parameter("Source")]
[Serializable]
public class GenTriggerTextMeshProUGUI_OnPreRenderText : TriggerSourceComponentBase<TextMeshProUGUI>
{
public GenTriggerTextMeshProUGUI_OnPreRenderText() : base(new GenTypeGameObject_TextMeshProUGUI())
{ }
protected override string GetTitle(GameObject source)
{
string member = TextUtils.ThemeAsKeyword("On Pre Render Text");
return $"{this.SourceName} {member}";
}
protected override void OnSourceChanged(TextMeshProUGUI previousSource, TextMeshProUGUI newSource)
{
if (previousSource != null)
{
previousSource.OnPreRenderText -= this.Run;
}
if (newSource != null)
{
newSource.OnPreRenderText += this.Run;
}
}
private void Run(TMP_TextInfo value1)
{
using Args args = Args.Get(
this.Component,
this.m_CurrentSource
);
this.Run(args);
}
}
}