Set TextMeshPro - Input Field Should Activate On Select#
UI / Interaction / TextMeshPro - Input Field / Set TextMeshPro - Input Field Should Activate On Select
Description#
Sets the Should Activate On Select property of TextMeshPro - Input Field component
Parameters#
| Name | Description |
|---|---|
| TMP Input Field | |
| Value |
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("Set TextMeshPro - Input Field Should Activate On Select")]
[Category("UI/Interaction/TextMeshPro - Input Field/Should Activate On Select")]
[Description("Sets the Should Activate On Select property of TextMeshPro - Input Field component")]
[Image(typeof(IconUIInputField), ColorTheme.Type.Blue)]
[Keywords("UI, User, Interface, TMP, Text, Mesh, Pro")]
[Parameter("TMP Input Field")]
[Parameter("Value")]
[Serializable]
public class GenInstructionBool_TMP_InputField_SetShouldActivateOnSelect : Instruction
{
[SerializeField] private GetGameObject m_TMP_InputField = new GetGameObject(
new GenTypeGameObject_TMP_InputField()
);
[SerializeField] private GetBool m_Value = new GetBool();
protected override string GetTitle(GameObject source)
{
string member = TextUtils.ThemeAsKeyword("Should Activate On Select");
return $"{this.m_TMP_InputField} {member} = {this.m_Value}";
}
protected override Awaitable Run(Args args)
{
TMP_InputField component = this.m_TMP_InputField.Get<TMP_InputField>(args);
if (component == null) return Done;
component.shouldActivateOnSelect = (bool) this.m_Value.Get(args);
return Done;
}
}
}