---
tags:
    - "UI, Layout"
---

# Vertical Layout Group Flexible Height

[UI](../../index.md) / [Layout](../index.md) / [Vertical Layout Group](index.md) / **Vertical Layout Group Flexible Height**

## Description

Compares the Flexible Height property of Vertical Layout Group component to another value

## Parameters

| Name | Description |
| :--- | :---------- |
| Vertical Layout Group |  |
| 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;

namespace VisualScript.Runtime
{
    [Title("Vertical Layout Group Flexible Height")]
    [Category("UI/Layout/Vertical Layout Group/Flexible Height")]
    [Description("Compares the Flexible Height property of Vertical Layout Group component to another value")]
    
    [Image(typeof(IconVerticalLayoutGroup), ColorTheme.Type.TextLight)]
    [Keywords("UI, Layout")]
    
    [Parameter("Vertical Layout Group")]
    [Parameter("Compare")]
    [Parameter("Value")]
    
    [Serializable]
    public class GenConditionNumber_VerticalLayoutGroup_CheckFlexibleHeight : Condition
    {
        [SerializeField] private GetGameObject m_VerticalLayoutGroup = new GetGameObject(
            new GenTypeGameObject_VerticalLayoutGroup()
        );
        
        [SerializeField] private CompareNumber m_Compare = new CompareNumber();
        
        [SerializeField] private GetNumber m_Value = new GetNumber();
        
        protected override string GetTitle(GameObject source)
        {
            string member = TextUtils.ThemeAsKeyword("Flexible Height");
            return $"{this.m_VerticalLayoutGroup} {member} {this.m_Compare} {this.m_Value}";
        }
        
        protected override bool Run(Args args)
        {
            VerticalLayoutGroup component = this.m_VerticalLayoutGroup.Get<VerticalLayoutGroup>(args);
            if (component == null) return false;
            
            return this.m_Compare.Compare(component.flexibleHeight, (float) this.m_Value.Get(args));
        }
    }
}


```

