---
tags:
    - "UI, User, Interface, TMP, Text, Mesh, Pro"
---

# TextMeshPro - Input Field Max Height

[UI](../../index.md) / [Interaction](../index.md) / [TextMeshPro - Input Field](index.md) / **TextMeshPro - Input Field Max Height**

## Description

Compares the Max Height property of TextMeshPro - Input Field component to another value

## Parameters

| Name | Description |
| :--- | :---------- |
| TMP Input Field |  |
| Compare |  |
| Value |  |

## Code

```cs
// <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 Max Height")]
    [Category("UI/Interaction/TextMeshPro - Input Field/Max Height")]
    [Description("Compares the Max Height property of TextMeshPro - Input Field component to another value")]

    [Image(typeof(IconUIInputField), ColorTheme.Type.Blue)]
    [Keywords("UI, User, Interface, TMP, Text, Mesh, Pro")]

    [Parameter("TMP Input Field")]
    [Parameter("Compare")]
    [Parameter("Value")]

    [Serializable]
    public class GenConditionNumber_TMP_InputField_CheckMaxHeight : Condition
    {
        [SerializeField] private GetGameObject m_TMP_InputField = new GetGameObject(
            new GenTypeGameObject_TMP_InputField()
        );

        [SerializeField] private CompareNumber m_Compare = new CompareNumber();

        [SerializeField] private GetNumber m_Value = new GetNumber();

        protected override string GetTitle(GameObject source)
        {
            string member = TextUtils.ThemeAsKeyword("Max Height");
            return $"{this.m_TMP_InputField} {member} {this.m_Compare} {this.m_Value}";
        }

        protected override bool Run(Args args)
        {
            TMP_InputField component = this.m_TMP_InputField.Get<TMP_InputField>(args);
            if (component == null) return false;

            return this.m_Compare.Compare(component.maxHeight, (float) this.m_Value.Get(args));
        }
    }
}
```

