TMP Text Cross Fade Alpha#
UI / Graphic / TMP Text / TMP Text Cross Fade Alpha
Description#
Executes the Cross Fade Alpha method on the TMP Text component
Parameters#
| Name | Description |
|---|---|
| Alpha | |
| Duration | |
| Ignore Time Scale |
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 Cross Fade Alpha")]
[Category("UI/Graphic/TMP Text/Cross Fade Alpha")]
[Description("Executes the Cross Fade Alpha method on the TMP Text component")]
[Image(typeof(IconUIText), ColorTheme.Type.Blue)]
[Keywords("UI, User, Interface, TMP, Text, Mesh, Pro")]
[Parameter("Alpha")]
[Parameter("Duration")]
[Parameter("Ignore Time Scale")]
[Serializable]
public class GenInstructionTMP_Text_CrossFadeAlpha_3 : Instruction
{
[SerializeField] private GetGameObject m_TMP_Text = new GetGameObject(
new GenTypeGameObject_TMP_Text()
);
[SerializeField] private GetNumber m_Alpha = new GetNumber();
[SerializeField] private GetNumber m_Duration = new GetNumber();
[SerializeField] private GetBool m_IgnoreTimeScale = new GetBool();
protected override string GetTitle(GameObject source)
{
string method = TextUtils.ThemeAsKeyword("Cross Fade Alpha");
return $"{this.m_TMP_Text} {method} ({this.m_Alpha}, {this.m_Duration}, {this.m_IgnoreTimeScale})";
}
protected override Awaitable Run(Args args)
{
TMP_Text component = this.m_TMP_Text.Get<TMP_Text>(args);
if (component == null) return Done;
component.CrossFadeAlpha(
(float) this.m_Alpha.Get(args),
(float) this.m_Duration.Get(args),
(bool) this.m_IgnoreTimeScale.Get(args)
);
return Done;
}
}
}