TextMeshPro - Input Field Set Global Font Asset#
UI / Interaction / TextMeshPro - Input Field / TextMeshPro - Input Field Set Global Font Asset
Description#
Executes the Set Global Font Asset method on the TextMeshPro - Input Field component
Parameters#
| Name | Description |
|---|---|
| Font Asset |
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 - Input Field Set Global Font Asset")]
[Category("UI/Interaction/TextMeshPro - Input Field/Set Global Font Asset")]
[Description("Executes the Set Global Font Asset method on the TextMeshPro - Input Field component")]
[Image(typeof(IconUIInputField), ColorTheme.Type.Blue)]
[Keywords("UI, User, Interface, TMP, Text, Mesh, Pro")]
[Parameter("Font Asset")]
[Serializable]
public class GenInstructionTMP_InputField_SetGlobalFontAsset_1 : Instruction
{
[SerializeField] private GetGameObject m_TMP_InputField = new GetGameObject(
new GenTypeGameObject_TMP_InputField()
);
[SerializeField] private GetScriptableObject m_FontAsset = new GetScriptableObject();
protected override string GetTitle(GameObject source)
{
string method = TextUtils.ThemeAsKeyword("Set Global Font Asset");
return $"{this.m_TMP_InputField} {method} ({this.m_FontAsset})";
}
protected override Awaitable Run(Args args)
{
TMP_InputField component = this.m_TMP_InputField.Get<TMP_InputField>(args);
if (component == null) return Done;
component.SetGlobalFontAsset(
(TMP_FontAsset) this.m_FontAsset.Get(args)
);
return Done;
}
}
}