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

# Set TMP Text Max Visible Lines

[UI](../../index.md) / [Graphic](../index.md) / [TMP Text](index.md) / **Set TMP Text Max Visible Lines**

## Description

Sets the Max Visible Lines property of TMP Text component

## Parameters

| Name | Description |
| :--- | :---------- |
| TMP Text |  |
| 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("Set TMP Text Max Visible Lines")]
    [Category("UI/Graphic/TMP Text/Max Visible Lines")]
    [Description("Sets the Max Visible Lines property of TMP Text component")]
    
    [Image(typeof(IconUIText), ColorTheme.Type.Blue)]
    [Keywords("UI, User, Interface, TMP, Text, Mesh, Pro")]
    
    [Parameter("TMP Text")]
    [Parameter("Value")]
    
    [Serializable]
    public class GenInstructionInteger_TMP_Text_SetMaxVisibleLines : Instruction
    {
        [SerializeField] private GetGameObject m_TMP_Text = new GetGameObject(
            new GenTypeGameObject_TMP_Text()
        );
        
        [SerializeField] private GetInteger m_Value = new GetInteger();
        
        protected override string GetTitle(GameObject source)
        {
            string member = TextUtils.ThemeAsKeyword("Max Visible Lines");
            return $"{this.m_TMP_Text} {member} = {this.m_Value}";
        }
        
        protected override Awaitable Run(Args args)
        {
            TMP_Text component = this.m_TMP_Text.Get<TMP_Text>(args);
            if (component == null) return Done;
            
            component.maxVisibleLines = (int) this.m_Value.Get(args);
            
            return Done;
        }
    }
}


```

