Documentation index for AI agents (llms.txt) A Markdown version of every page is available: request the page's source under /docs/, follow the "alternate" link in this page's head, or start from /llms.txt.
Visual Script logo Manual

TextMeshPro - Input Field Preferred Height#

UI / Interaction / TextMeshPro - Input Field / TextMeshPro - Input Field Preferred Height

  • Can Read

  • Cannot Write

Description#

The Preferred Height 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]
    
    [Title("TextMeshPro - Input Field Preferred Height")]
    [Category("UI/Interaction/TextMeshPro - Input Field/Preferred Height")]
    [Description("The Preferred Height property of the TextMeshPro - Input Field component")]
    
    [Image(typeof(IconUIInputField), ColorTheme.Type.Blue)]
    [Keywords("UI, User, Interface, TMP, Text, Mesh, Pro")]
    
    [Serializable]
    public class GenTypeNumber_TMP_InputField_PreferredHeight : TypeNumber
    {
        [SerializeField] private GetGameObject m_TMP_InputField = new GetGameObject(
            new GenTypeGameObject_TMP_InputField()
        );
        
        public override double 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.preferredHeight : default;
        }
        
        public override double Get(Args args)
        {
            TMP_InputField instance = this.m_TMP_InputField.Get<TMP_InputField>(args);
            return instance != null
                ? instance.preferredHeight
                : default;
        }
        
        public override string ToString()
        {
            return $"{this.m_TMP_InputField} Preferred Height";
        }
        
        protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
    }
}

Visual Script logoVisual Script © Catsoft Works 2026. All rights reserved.