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

Vertical Layout Group Max Width#

UI / Layout / Vertical Layout Group / Vertical Layout Group Max Width

  • Can Read

  • Cannot Write

Description#

The Max Width property of the Vertical Layout Group 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;

namespace VisualScript.Runtime
{
    [Get]

    [Title("Vertical Layout Group Max Width")]
    [Category("UI/Layout/Vertical Layout Group/Max Width")]
    [Description("The Max Width property of the Vertical Layout Group component")]

    [Image(typeof(IconVerticalLayoutGroup), ColorTheme.Type.TextLight)]
    [Keywords("UI, Layout")]

    [Serializable]
    public class GenTypeNumber_VerticalLayoutGroup_MaxWidth : TypeNumber
    {
        [SerializeField] private GetGameObject m_VerticalLayoutGroup = new GetGameObject(
            new GenTypeGameObject_VerticalLayoutGroup()
        );

        public override double GetPreview(GameObject source)
        {
            GameObject instance = this.m_VerticalLayoutGroup.GetPreview(source);
            if (instance == null) return default;

            VerticalLayoutGroup component = instance.GetComponent<VerticalLayoutGroup>();
            return component != null ? component.maxWidth : default;
        }

        public override double Get(Args args)
        {
            VerticalLayoutGroup instance = this.m_VerticalLayoutGroup.Get<VerticalLayoutGroup>(args);
            return instance != null
                ? instance.maxWidth
                : default;
        }

        public override string ToString()
        {
            return $"{this.m_VerticalLayoutGroup} Max Width";
        }

        protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
    }
}
Visual Script logoVisual Script © Catsoft Works 2026. All rights reserved.