TextMeshPro - Input Field Keep Text Selection Visible#
UI / Interaction / TextMeshPro - Input Field / TextMeshPro - Input Field Keep Text Selection Visible
Can Read
Can Write
Description#
The Keep Text Selection Visible property of the TextMeshPro - Input Field component
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
{
[Get]
[Set]
[Title("TextMeshPro - Input Field Keep Text Selection Visible")]
[Category("UI/Interaction/TextMeshPro - Input Field/Keep Text Selection Visible")]
[Description("The Keep Text Selection Visible property of the TextMeshPro - Input Field component")]
[Image(typeof(IconUIInputField), ColorTheme.Type.Blue)]
[Keywords("UI, User, Interface, TMP, Text, Mesh, Pro")]
[Serializable]
public class GenTypeBool_TMP_InputField_KeepTextSelectionVisible : TypeBool
{
[SerializeField] private GetGameObject m_TMP_InputField = new GetGameObject(
new GenTypeGameObject_TMP_InputField()
);
public override bool GetPreview(GameObject source)
{
GameObject instance = this.m_TMP_InputField.GetPreview(source);
if (instance == null) return default;
TMP_InputField component = instance.GetComponent<TMP_InputField>();
return component != null ? component.keepTextSelectionVisible : default;
}
public override bool Get(Args args)
{
TMP_InputField instance = this.m_TMP_InputField.Get<TMP_InputField>(args);
return instance != null
? instance.keepTextSelectionVisible
: default;
}
public override void Set(bool value, Args args)
{
TMP_InputField component = this.m_TMP_InputField.Get<TMP_InputField>(args);
if (component != null) component.keepTextSelectionVisible = (bool) value;
}
public override string ToString()
{
return $"{this.m_TMP_InputField} Keep Text Selection Visible";
}
protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
}
}