# BeginVertical

> Begin a vertical control group.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine](/engine/6000.6/script-reference/unityengine.md)
* **Assembly:** UnityEngine.IMGUIModule

## BeginVertical(GUILayoutOption\[])

Begin a vertical control group.

```csharp
public static void BeginVertical(params GUILayoutOption[] options)
```

### Parameters

**** (\[GUILayoutOption\[]]\(/engine/6000.6/script-reference/unityengine/guilayoutoption)): An optional list of layout options that specify extra layouting properties. Any values passed in here will override settings defined by the `style`.\
&#x20;Additional Resources: [GUILayout.Width](/engine/6000.6/script-reference/unityengine/guilayout/width.md), [GUILayout.Height](/engine/6000.6/script-reference/unityengine/guilayout/height.md), [GUILayout.MinWidth](/engine/6000.6/script-reference/unityengine/guilayout/minwidth.md), [GUILayout.MaxWidth](/engine/6000.6/script-reference/unityengine/guilayout/maxwidth.md), [GUILayout.MinHeight](/engine/6000.6/script-reference/unityengine/guilayout/minheight.md), [GUILayout.MaxHeight](/engine/6000.6/script-reference/unityengine/guilayout/maxheight.md), [GUILayout.ExpandWidth](/engine/6000.6/script-reference/unityengine/guilayout/expandwidth.md), [GUILayout.ExpandHeight](/engine/6000.6/script-reference/unityengine/guilayout/expandheight.md).

### Remarks

All controls rendered inside this element will be placed vertically below each other. The group must be closed with a call to EndVertical.

![GUILayoutVertical (BeginVertical)](/api/media?file=/engine/6000.6/media/images/GUILayoutVertical.png)

*Vertical Layout.*

### Examples

```csharp
using UnityEngine;

public class ExampleScript : MonoBehaviour
{
    void OnGUI()
    {
        // Starts a vertical group
        GUILayout.BeginVertical("box");

        GUILayout.Button("I'm the top button");
        GUILayout.Button("I'm the bottom button");

        GUILayout.EndVertical();
    }
}
```

## BeginVertical(GUIStyle, GUILayoutOption\[])

Begin a vertical control group.

```csharp
public static void BeginVertical(GUIStyle style, params GUILayoutOption[] options)
```

### Parameters

**** (\[GUIStyle]\(/engine/6000.6/script-reference/unityengine/guistyle)): The style to use for background image and padding values. If left out, the background is transparent.**** (\[GUILayoutOption\[]]\(/engine/6000.6/script-reference/unityengine/guilayoutoption)): An optional list of layout options that specify extra layouting properties. Any values passed in here will override settings defined by the `style`.\
&#x20;Additional Resources: [GUILayout.Width](/engine/6000.6/script-reference/unityengine/guilayout/width.md), [GUILayout.Height](/engine/6000.6/script-reference/unityengine/guilayout/height.md), [GUILayout.MinWidth](/engine/6000.6/script-reference/unityengine/guilayout/minwidth.md), [GUILayout.MaxWidth](/engine/6000.6/script-reference/unityengine/guilayout/maxwidth.md), [GUILayout.MinHeight](/engine/6000.6/script-reference/unityengine/guilayout/minheight.md), [GUILayout.MaxHeight](/engine/6000.6/script-reference/unityengine/guilayout/maxheight.md), [GUILayout.ExpandWidth](/engine/6000.6/script-reference/unityengine/guilayout/expandwidth.md), [GUILayout.ExpandHeight](/engine/6000.6/script-reference/unityengine/guilayout/expandheight.md).

### Remarks

All controls rendered inside this element will be placed vertically below each other. The group must be closed with a call to EndVertical.

![GUILayoutVertical (BeginVertical)](/api/media?file=/engine/6000.6/media/images/GUILayoutVertical.png)

*Vertical Layout.*

### Examples

```csharp
using UnityEngine;

public class ExampleScript : MonoBehaviour
{
    void OnGUI()
    {
        // Starts a vertical group
        GUILayout.BeginVertical("box");

        GUILayout.Button("I'm the top button");
        GUILayout.Button("I'm the bottom button");

        GUILayout.EndVertical();
    }
}
```

## BeginVertical(string, GUIStyle, GUILayoutOption\[])

Begin a vertical control group.

```csharp
public static void BeginVertical(string text, GUIStyle style, params GUILayoutOption[] options)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Text to display on group.**** (\[GUIStyle]\(/engine/6000.6/script-reference/unityengine/guistyle)): The style to use for background image and padding values. If left out, the background is transparent.**** (\[GUILayoutOption\[]]\(/engine/6000.6/script-reference/unityengine/guilayoutoption)): An optional list of layout options that specify extra layouting properties. Any values passed in here will override settings defined by the `style`.\
&#x20;Additional Resources: [GUILayout.Width](/engine/6000.6/script-reference/unityengine/guilayout/width.md), [GUILayout.Height](/engine/6000.6/script-reference/unityengine/guilayout/height.md), [GUILayout.MinWidth](/engine/6000.6/script-reference/unityengine/guilayout/minwidth.md), [GUILayout.MaxWidth](/engine/6000.6/script-reference/unityengine/guilayout/maxwidth.md), [GUILayout.MinHeight](/engine/6000.6/script-reference/unityengine/guilayout/minheight.md), [GUILayout.MaxHeight](/engine/6000.6/script-reference/unityengine/guilayout/maxheight.md), [GUILayout.ExpandWidth](/engine/6000.6/script-reference/unityengine/guilayout/expandwidth.md), [GUILayout.ExpandHeight](/engine/6000.6/script-reference/unityengine/guilayout/expandheight.md).

### Remarks

All controls rendered inside this element will be placed vertically below each other. The group must be closed with a call to EndVertical.

![GUILayoutVertical (BeginVertical)](/api/media?file=/engine/6000.6/media/images/GUILayoutVertical.png)

*Vertical Layout.*

### Examples

```csharp
using UnityEngine;

public class ExampleScript : MonoBehaviour
{
    void OnGUI()
    {
        // Starts a vertical group
        GUILayout.BeginVertical("box");

        GUILayout.Button("I'm the top button");
        GUILayout.Button("I'm the bottom button");

        GUILayout.EndVertical();
    }
}
```

## BeginVertical(Texture, GUIStyle, GUILayoutOption\[])

Begin a vertical control group.

```csharp
public static void BeginVertical(Texture image, GUIStyle style, params GUILayoutOption[] options)
```

### Parameters

**** (\[Texture]\(/engine/6000.6/script-reference/unityengine/texture)): [Texture](/engine/6000.6/script-reference/unityengine/texture.md) to display on group.**** (\[GUIStyle]\(/engine/6000.6/script-reference/unityengine/guistyle)): The style to use for background image and padding values. If left out, the background is transparent.**** (\[GUILayoutOption\[]]\(/engine/6000.6/script-reference/unityengine/guilayoutoption)): An optional list of layout options that specify extra layouting properties. Any values passed in here will override settings defined by the `style`.\
&#x20;Additional Resources: [GUILayout.Width](/engine/6000.6/script-reference/unityengine/guilayout/width.md), [GUILayout.Height](/engine/6000.6/script-reference/unityengine/guilayout/height.md), [GUILayout.MinWidth](/engine/6000.6/script-reference/unityengine/guilayout/minwidth.md), [GUILayout.MaxWidth](/engine/6000.6/script-reference/unityengine/guilayout/maxwidth.md), [GUILayout.MinHeight](/engine/6000.6/script-reference/unityengine/guilayout/minheight.md), [GUILayout.MaxHeight](/engine/6000.6/script-reference/unityengine/guilayout/maxheight.md), [GUILayout.ExpandWidth](/engine/6000.6/script-reference/unityengine/guilayout/expandwidth.md), [GUILayout.ExpandHeight](/engine/6000.6/script-reference/unityengine/guilayout/expandheight.md).

### Remarks

All controls rendered inside this element will be placed vertically below each other. The group must be closed with a call to EndVertical.

![GUILayoutVertical (BeginVertical)](/api/media?file=/engine/6000.6/media/images/GUILayoutVertical.png)

*Vertical Layout.*

### Examples

```csharp
using UnityEngine;

public class ExampleScript : MonoBehaviour
{
    void OnGUI()
    {
        // Starts a vertical group
        GUILayout.BeginVertical("box");

        GUILayout.Button("I'm the top button");
        GUILayout.Button("I'm the bottom button");

        GUILayout.EndVertical();
    }
}
```

## BeginVertical(GUIContent, GUIStyle, GUILayoutOption\[])

Begin a vertical control group.

```csharp
public static void BeginVertical(GUIContent content, GUIStyle style, params GUILayoutOption[] options)
```

### Parameters

**** (\[GUIContent]\(/engine/6000.6/script-reference/unityengine/guicontent)): Text, image, and tooltip for this group.**** (\[GUIStyle]\(/engine/6000.6/script-reference/unityengine/guistyle)): The style to use for background image and padding values. If left out, the background is transparent.**** (\[GUILayoutOption\[]]\(/engine/6000.6/script-reference/unityengine/guilayoutoption)): An optional list of layout options that specify extra layouting properties. Any values passed in here will override settings defined by the `style`.\
&#x20;Additional Resources: [GUILayout.Width](/engine/6000.6/script-reference/unityengine/guilayout/width.md), [GUILayout.Height](/engine/6000.6/script-reference/unityengine/guilayout/height.md), [GUILayout.MinWidth](/engine/6000.6/script-reference/unityengine/guilayout/minwidth.md), [GUILayout.MaxWidth](/engine/6000.6/script-reference/unityengine/guilayout/maxwidth.md), [GUILayout.MinHeight](/engine/6000.6/script-reference/unityengine/guilayout/minheight.md), [GUILayout.MaxHeight](/engine/6000.6/script-reference/unityengine/guilayout/maxheight.md), [GUILayout.ExpandWidth](/engine/6000.6/script-reference/unityengine/guilayout/expandwidth.md), [GUILayout.ExpandHeight](/engine/6000.6/script-reference/unityengine/guilayout/expandheight.md).

### Remarks

All controls rendered inside this element will be placed vertically below each other. The group must be closed with a call to EndVertical.

![GUILayoutVertical (BeginVertical)](/api/media?file=/engine/6000.6/media/images/GUILayoutVertical.png)

*Vertical Layout.*

### Examples

```csharp
using UnityEngine;

public class ExampleScript : MonoBehaviour
{
    void OnGUI()
    {
        // Starts a vertical group
        GUILayout.BeginVertical("box");

        GUILayout.Button("I'm the top button");
        GUILayout.Button("I'm the bottom button");

        GUILayout.EndVertical();
    }
}
```
