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

# Grid Layout Group Set Layout Vertical

[UI](../../index.md) / [Layout](../index.md) / [Grid Layout Group](index.md) / **Grid Layout Group Set Layout Vertical**

## Description

Executes the Set Layout Vertical method on the Grid Layout Group component

## 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("Grid Layout Group Set Layout Vertical")]
    [Category("UI/Layout/Grid Layout Group/Set Layout Vertical")]
    [Description("Executes the Set Layout Vertical method on the Grid Layout Group component")]
    
    [Image(typeof(IconGridLayoutGroup), ColorTheme.Type.TextLight)]
    [Keywords("UI, Layout")]
    
    [Serializable]
    public class GenInstructionGridLayoutGroup_SetLayoutVertical_0 : Instruction
    {
        [SerializeField] private GetGameObject m_GridLayoutGroup = new GetGameObject(
            new GenTypeGameObject_GridLayoutGroup()
        );
        
        protected override string GetTitle(GameObject source)
        {
            string method = TextUtils.ThemeAsKeyword("Set Layout Vertical");
            return $"{this.m_GridLayoutGroup} {method}";
        }
        
        protected override Awaitable Run(Args args)
        {
            GridLayoutGroup component = this.m_GridLayoutGroup.Get<GridLayoutGroup>(args);
            if (component == null) return Done;
            
            component.SetLayoutVertical();
            
            return Done;
        }
    }
}


```

