# IntPopup

> Make an integer popup selection field.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor](/engine/6000.0/script-reference/unityeditor.md)
* **Assembly:** UnityEditor

## IntPopup(int, string\[], int\[], GUILayoutOption\[])

Make an integer popup selection field.

```csharp
public static int IntPopup(int selectedValue, string[] displayedOptions, int[] optionValues, params GUILayoutOption[] options)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The value of the option the field shows.**** (\[string\[]]\(https\://learn.microsoft.com/dotnet/api/system.string)): An array with the displayed options the user can choose from.**** (\[int\[]]\(https\://learn.microsoft.com/dotnet/api/system.int32)): An array with the values for each option.**** (\[GUILayoutOption\[]]\(/engine/6000.0/script-reference/unityengine/guilayoutoption)): An optional list of layout options that specify extra layout properties. Any values passed in here will override settings defined by the style.\
&#x20;Additional Resources: [GUILayout.Width](/engine/6000.0/script-reference/unityengine/guilayout/width.md), [GUILayout.Height](/engine/6000.0/script-reference/unityengine/guilayout/height.md), [GUILayout.MinWidth](/engine/6000.0/script-reference/unityengine/guilayout/minwidth.md), [GUILayout.MaxWidth](/engine/6000.0/script-reference/unityengine/guilayout/maxwidth.md), [GUILayout.MinHeight](/engine/6000.0/script-reference/unityengine/guilayout/minheight.md), [GUILayout.MaxHeight](/engine/6000.0/script-reference/unityengine/guilayout/maxheight.md), [GUILayout.ExpandWidth](/engine/6000.0/script-reference/unityengine/guilayout/expandwidth.md), [GUILayout.ExpandHeight](/engine/6000.0/script-reference/unityengine/guilayout/expandheight.md).

### Returns

| Type                                                       | Description                                                 |
| ---------------------------------------------------------- | ----------------------------------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | The value of the option that has been selected by the user. |

### Remarks

Takes the currently selected integer as a parameter and returns the integer selected by the user.

![EditorGUILayoutIntPopup (IntPopup)](/api/media?file=/engine/6000.0/media/images/EditorGUILayoutIntPopup.png)

*Rescales the current selected GameObject.*

### Examples

```csharp
// Simple Editor Script that lets you rescale the current selected GameObject.
using UnityEditor;
using UnityEngine;

public class IntPopupExample : EditorWindow
{
    int   selectedSize = 1;
    string[] names = new string[] {"Normal", "Double", "Quadruple"};
    int[] sizes = {1, 2, 4};

    [MenuItem("Examples/Int Popup usage")]
    static void Init()
    {
        EditorWindow window = GetWindow(typeof(IntPopupExample));
        window.Show();
    }

    void OnGUI()
    {
        selectedSize = EditorGUILayout.IntPopup("Resize Scale: ", selectedSize, names, sizes);
        if (GUILayout.Button("Scale"))
            ReScale();
    }

    void ReScale()
    {
        if (Selection.activeTransform)
            Selection.activeTransform.localScale =
                new Vector3(selectedSize, selectedSize, selectedSize);
        else
            Debug.LogError("No Object selected, please select an object to scale.");
    }
}
```

## IntPopup(int, string\[], int\[], GUIStyle, GUILayoutOption\[])

Make an integer popup selection field.

```csharp
public static int IntPopup(int selectedValue, string[] displayedOptions, int[] optionValues, GUIStyle style, params GUILayoutOption[] options)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The value of the option the field shows.**** (\[string\[]]\(https\://learn.microsoft.com/dotnet/api/system.string)): An array with the displayed options the user can choose from.**** (\[int\[]]\(https\://learn.microsoft.com/dotnet/api/system.int32)): An array with the values for each option.**** (\[GUIStyle]\(/engine/6000.0/script-reference/unityengine/guistyle)): Optional [GUIStyle](/engine/6000.0/script-reference/unityengine/guistyle.md).**** (\[GUILayoutOption\[]]\(/engine/6000.0/script-reference/unityengine/guilayoutoption)): An optional list of layout options that specify extra layout properties. Any values passed in here will override settings defined by the style.\
&#x20;Additional Resources: [GUILayout.Width](/engine/6000.0/script-reference/unityengine/guilayout/width.md), [GUILayout.Height](/engine/6000.0/script-reference/unityengine/guilayout/height.md), [GUILayout.MinWidth](/engine/6000.0/script-reference/unityengine/guilayout/minwidth.md), [GUILayout.MaxWidth](/engine/6000.0/script-reference/unityengine/guilayout/maxwidth.md), [GUILayout.MinHeight](/engine/6000.0/script-reference/unityengine/guilayout/minheight.md), [GUILayout.MaxHeight](/engine/6000.0/script-reference/unityengine/guilayout/maxheight.md), [GUILayout.ExpandWidth](/engine/6000.0/script-reference/unityengine/guilayout/expandwidth.md), [GUILayout.ExpandHeight](/engine/6000.0/script-reference/unityengine/guilayout/expandheight.md).

### Returns

| Type                                                       | Description                                                 |
| ---------------------------------------------------------- | ----------------------------------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | The value of the option that has been selected by the user. |

### Remarks

Takes the currently selected integer as a parameter and returns the integer selected by the user.

![EditorGUILayoutIntPopup (IntPopup)](/api/media?file=/engine/6000.0/media/images/EditorGUILayoutIntPopup.png)

*Rescales the current selected GameObject.*

### Examples

```csharp
// Simple Editor Script that lets you rescale the current selected GameObject.
using UnityEditor;
using UnityEngine;

public class IntPopupExample : EditorWindow
{
    int   selectedSize = 1;
    string[] names = new string[] {"Normal", "Double", "Quadruple"};
    int[] sizes = {1, 2, 4};

    [MenuItem("Examples/Int Popup usage")]
    static void Init()
    {
        EditorWindow window = GetWindow(typeof(IntPopupExample));
        window.Show();
    }

    void OnGUI()
    {
        selectedSize = EditorGUILayout.IntPopup("Resize Scale: ", selectedSize, names, sizes);
        if (GUILayout.Button("Scale"))
            ReScale();
    }

    void ReScale()
    {
        if (Selection.activeTransform)
            Selection.activeTransform.localScale =
                new Vector3(selectedSize, selectedSize, selectedSize);
        else
            Debug.LogError("No Object selected, please select an object to scale.");
    }
}
```

## IntPopup(int, GUIContent\[], int\[], GUILayoutOption\[])

Make an integer popup selection field.

```csharp
public static int IntPopup(int selectedValue, GUIContent[] displayedOptions, int[] optionValues, params GUILayoutOption[] options)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The value of the option the field shows.**** (\[GUIContent\[]]\(/engine/6000.0/script-reference/unityengine/guicontent)): An array with the displayed options the user can choose from.**** (\[int\[]]\(https\://learn.microsoft.com/dotnet/api/system.int32)): An array with the values for each option.**** (\[GUILayoutOption\[]]\(/engine/6000.0/script-reference/unityengine/guilayoutoption)): An optional list of layout options that specify extra layout properties. Any values passed in here will override settings defined by the style.\
&#x20;Additional Resources: [GUILayout.Width](/engine/6000.0/script-reference/unityengine/guilayout/width.md), [GUILayout.Height](/engine/6000.0/script-reference/unityengine/guilayout/height.md), [GUILayout.MinWidth](/engine/6000.0/script-reference/unityengine/guilayout/minwidth.md), [GUILayout.MaxWidth](/engine/6000.0/script-reference/unityengine/guilayout/maxwidth.md), [GUILayout.MinHeight](/engine/6000.0/script-reference/unityengine/guilayout/minheight.md), [GUILayout.MaxHeight](/engine/6000.0/script-reference/unityengine/guilayout/maxheight.md), [GUILayout.ExpandWidth](/engine/6000.0/script-reference/unityengine/guilayout/expandwidth.md), [GUILayout.ExpandHeight](/engine/6000.0/script-reference/unityengine/guilayout/expandheight.md).

### Returns

| Type                                                       | Description                                                 |
| ---------------------------------------------------------- | ----------------------------------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | The value of the option that has been selected by the user. |

### Remarks

Takes the currently selected integer as a parameter and returns the integer selected by the user.

![EditorGUILayoutIntPopup (IntPopup)](/api/media?file=/engine/6000.0/media/images/EditorGUILayoutIntPopup.png)

*Rescales the current selected GameObject.*

### Examples

```csharp
// Simple Editor Script that lets you rescale the current selected GameObject.
using UnityEditor;
using UnityEngine;

public class IntPopupExample : EditorWindow
{
    int   selectedSize = 1;
    string[] names = new string[] {"Normal", "Double", "Quadruple"};
    int[] sizes = {1, 2, 4};

    [MenuItem("Examples/Int Popup usage")]
    static void Init()
    {
        EditorWindow window = GetWindow(typeof(IntPopupExample));
        window.Show();
    }

    void OnGUI()
    {
        selectedSize = EditorGUILayout.IntPopup("Resize Scale: ", selectedSize, names, sizes);
        if (GUILayout.Button("Scale"))
            ReScale();
    }

    void ReScale()
    {
        if (Selection.activeTransform)
            Selection.activeTransform.localScale =
                new Vector3(selectedSize, selectedSize, selectedSize);
        else
            Debug.LogError("No Object selected, please select an object to scale.");
    }
}
```

## IntPopup(int, GUIContent\[], int\[], GUIStyle, GUILayoutOption\[])

Make an integer popup selection field.

```csharp
public static int IntPopup(int selectedValue, GUIContent[] displayedOptions, int[] optionValues, GUIStyle style, params GUILayoutOption[] options)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The value of the option the field shows.**** (\[GUIContent\[]]\(/engine/6000.0/script-reference/unityengine/guicontent)): An array with the displayed options the user can choose from.**** (\[int\[]]\(https\://learn.microsoft.com/dotnet/api/system.int32)): An array with the values for each option.**** (\[GUIStyle]\(/engine/6000.0/script-reference/unityengine/guistyle)): Optional [GUIStyle](/engine/6000.0/script-reference/unityengine/guistyle.md).**** (\[GUILayoutOption\[]]\(/engine/6000.0/script-reference/unityengine/guilayoutoption)): An optional list of layout options that specify extra layout properties. Any values passed in here will override settings defined by the style.\
&#x20;Additional Resources: [GUILayout.Width](/engine/6000.0/script-reference/unityengine/guilayout/width.md), [GUILayout.Height](/engine/6000.0/script-reference/unityengine/guilayout/height.md), [GUILayout.MinWidth](/engine/6000.0/script-reference/unityengine/guilayout/minwidth.md), [GUILayout.MaxWidth](/engine/6000.0/script-reference/unityengine/guilayout/maxwidth.md), [GUILayout.MinHeight](/engine/6000.0/script-reference/unityengine/guilayout/minheight.md), [GUILayout.MaxHeight](/engine/6000.0/script-reference/unityengine/guilayout/maxheight.md), [GUILayout.ExpandWidth](/engine/6000.0/script-reference/unityengine/guilayout/expandwidth.md), [GUILayout.ExpandHeight](/engine/6000.0/script-reference/unityengine/guilayout/expandheight.md).

### Returns

| Type                                                       | Description                                                 |
| ---------------------------------------------------------- | ----------------------------------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | The value of the option that has been selected by the user. |

### Remarks

Takes the currently selected integer as a parameter and returns the integer selected by the user.

![EditorGUILayoutIntPopup (IntPopup)](/api/media?file=/engine/6000.0/media/images/EditorGUILayoutIntPopup.png)

*Rescales the current selected GameObject.*

### Examples

```csharp
// Simple Editor Script that lets you rescale the current selected GameObject.
using UnityEditor;
using UnityEngine;

public class IntPopupExample : EditorWindow
{
    int   selectedSize = 1;
    string[] names = new string[] {"Normal", "Double", "Quadruple"};
    int[] sizes = {1, 2, 4};

    [MenuItem("Examples/Int Popup usage")]
    static void Init()
    {
        EditorWindow window = GetWindow(typeof(IntPopupExample));
        window.Show();
    }

    void OnGUI()
    {
        selectedSize = EditorGUILayout.IntPopup("Resize Scale: ", selectedSize, names, sizes);
        if (GUILayout.Button("Scale"))
            ReScale();
    }

    void ReScale()
    {
        if (Selection.activeTransform)
            Selection.activeTransform.localScale =
                new Vector3(selectedSize, selectedSize, selectedSize);
        else
            Debug.LogError("No Object selected, please select an object to scale.");
    }
}
```

## IntPopup(string, int, string\[], int\[], GUILayoutOption\[])

Make an integer popup selection field.

```csharp
public static int IntPopup(string label, int selectedValue, string[] displayedOptions, int[] optionValues, params GUILayoutOption[] options)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Optional label in front of the field.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The value of the option the field shows.**** (\[string\[]]\(https\://learn.microsoft.com/dotnet/api/system.string)): An array with the displayed options the user can choose from.**** (\[int\[]]\(https\://learn.microsoft.com/dotnet/api/system.int32)): An array with the values for each option.**** (\[GUILayoutOption\[]]\(/engine/6000.0/script-reference/unityengine/guilayoutoption)): An optional list of layout options that specify extra layout properties. Any values passed in here will override settings defined by the style.\
&#x20;Additional Resources: [GUILayout.Width](/engine/6000.0/script-reference/unityengine/guilayout/width.md), [GUILayout.Height](/engine/6000.0/script-reference/unityengine/guilayout/height.md), [GUILayout.MinWidth](/engine/6000.0/script-reference/unityengine/guilayout/minwidth.md), [GUILayout.MaxWidth](/engine/6000.0/script-reference/unityengine/guilayout/maxwidth.md), [GUILayout.MinHeight](/engine/6000.0/script-reference/unityengine/guilayout/minheight.md), [GUILayout.MaxHeight](/engine/6000.0/script-reference/unityengine/guilayout/maxheight.md), [GUILayout.ExpandWidth](/engine/6000.0/script-reference/unityengine/guilayout/expandwidth.md), [GUILayout.ExpandHeight](/engine/6000.0/script-reference/unityengine/guilayout/expandheight.md).

### Returns

| Type                                                       | Description                                                 |
| ---------------------------------------------------------- | ----------------------------------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | The value of the option that has been selected by the user. |

### Remarks

Takes the currently selected integer as a parameter and returns the integer selected by the user.

![EditorGUILayoutIntPopup (IntPopup)](/api/media?file=/engine/6000.0/media/images/EditorGUILayoutIntPopup.png)

*Rescales the current selected GameObject.*

### Examples

```csharp
// Simple Editor Script that lets you rescale the current selected GameObject.
using UnityEditor;
using UnityEngine;

public class IntPopupExample : EditorWindow
{
    int   selectedSize = 1;
    string[] names = new string[] {"Normal", "Double", "Quadruple"};
    int[] sizes = {1, 2, 4};

    [MenuItem("Examples/Int Popup usage")]
    static void Init()
    {
        EditorWindow window = GetWindow(typeof(IntPopupExample));
        window.Show();
    }

    void OnGUI()
    {
        selectedSize = EditorGUILayout.IntPopup("Resize Scale: ", selectedSize, names, sizes);
        if (GUILayout.Button("Scale"))
            ReScale();
    }

    void ReScale()
    {
        if (Selection.activeTransform)
            Selection.activeTransform.localScale =
                new Vector3(selectedSize, selectedSize, selectedSize);
        else
            Debug.LogError("No Object selected, please select an object to scale.");
    }
}
```

## IntPopup(string, int, string\[], int\[], GUIStyle, GUILayoutOption\[])

Make an integer popup selection field.

```csharp
public static int IntPopup(string label, int selectedValue, string[] displayedOptions, int[] optionValues, GUIStyle style, params GUILayoutOption[] options)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Optional label in front of the field.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The value of the option the field shows.**** (\[string\[]]\(https\://learn.microsoft.com/dotnet/api/system.string)): An array with the displayed options the user can choose from.**** (\[int\[]]\(https\://learn.microsoft.com/dotnet/api/system.int32)): An array with the values for each option.**** (\[GUIStyle]\(/engine/6000.0/script-reference/unityengine/guistyle)): Optional [GUIStyle](/engine/6000.0/script-reference/unityengine/guistyle.md).**** (\[GUILayoutOption\[]]\(/engine/6000.0/script-reference/unityengine/guilayoutoption)): An optional list of layout options that specify extra layout properties. Any values passed in here will override settings defined by the style.\
&#x20;Additional Resources: [GUILayout.Width](/engine/6000.0/script-reference/unityengine/guilayout/width.md), [GUILayout.Height](/engine/6000.0/script-reference/unityengine/guilayout/height.md), [GUILayout.MinWidth](/engine/6000.0/script-reference/unityengine/guilayout/minwidth.md), [GUILayout.MaxWidth](/engine/6000.0/script-reference/unityengine/guilayout/maxwidth.md), [GUILayout.MinHeight](/engine/6000.0/script-reference/unityengine/guilayout/minheight.md), [GUILayout.MaxHeight](/engine/6000.0/script-reference/unityengine/guilayout/maxheight.md), [GUILayout.ExpandWidth](/engine/6000.0/script-reference/unityengine/guilayout/expandwidth.md), [GUILayout.ExpandHeight](/engine/6000.0/script-reference/unityengine/guilayout/expandheight.md).

### Returns

| Type                                                       | Description                                                 |
| ---------------------------------------------------------- | ----------------------------------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | The value of the option that has been selected by the user. |

### Remarks

Takes the currently selected integer as a parameter and returns the integer selected by the user.

![EditorGUILayoutIntPopup (IntPopup)](/api/media?file=/engine/6000.0/media/images/EditorGUILayoutIntPopup.png)

*Rescales the current selected GameObject.*

### Examples

```csharp
// Simple Editor Script that lets you rescale the current selected GameObject.
using UnityEditor;
using UnityEngine;

public class IntPopupExample : EditorWindow
{
    int   selectedSize = 1;
    string[] names = new string[] {"Normal", "Double", "Quadruple"};
    int[] sizes = {1, 2, 4};

    [MenuItem("Examples/Int Popup usage")]
    static void Init()
    {
        EditorWindow window = GetWindow(typeof(IntPopupExample));
        window.Show();
    }

    void OnGUI()
    {
        selectedSize = EditorGUILayout.IntPopup("Resize Scale: ", selectedSize, names, sizes);
        if (GUILayout.Button("Scale"))
            ReScale();
    }

    void ReScale()
    {
        if (Selection.activeTransform)
            Selection.activeTransform.localScale =
                new Vector3(selectedSize, selectedSize, selectedSize);
        else
            Debug.LogError("No Object selected, please select an object to scale.");
    }
}
```

## IntPopup(GUIContent, int, GUIContent\[], int\[], GUILayoutOption\[])

Make an integer popup selection field.

```csharp
public static int IntPopup(GUIContent label, int selectedValue, GUIContent[] displayedOptions, int[] optionValues, params GUILayoutOption[] options)
```

### Parameters

**** (\[GUIContent]\(/engine/6000.0/script-reference/unityengine/guicontent)): Optional label in front of the field.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The value of the option the field shows.**** (\[GUIContent\[]]\(/engine/6000.0/script-reference/unityengine/guicontent)): An array with the displayed options the user can choose from.**** (\[int\[]]\(https\://learn.microsoft.com/dotnet/api/system.int32)): An array with the values for each option.**** (\[GUILayoutOption\[]]\(/engine/6000.0/script-reference/unityengine/guilayoutoption)): An optional list of layout options that specify extra layout properties. Any values passed in here will override settings defined by the style.\
&#x20;Additional Resources: [GUILayout.Width](/engine/6000.0/script-reference/unityengine/guilayout/width.md), [GUILayout.Height](/engine/6000.0/script-reference/unityengine/guilayout/height.md), [GUILayout.MinWidth](/engine/6000.0/script-reference/unityengine/guilayout/minwidth.md), [GUILayout.MaxWidth](/engine/6000.0/script-reference/unityengine/guilayout/maxwidth.md), [GUILayout.MinHeight](/engine/6000.0/script-reference/unityengine/guilayout/minheight.md), [GUILayout.MaxHeight](/engine/6000.0/script-reference/unityengine/guilayout/maxheight.md), [GUILayout.ExpandWidth](/engine/6000.0/script-reference/unityengine/guilayout/expandwidth.md), [GUILayout.ExpandHeight](/engine/6000.0/script-reference/unityengine/guilayout/expandheight.md).

### Returns

| Type                                                       | Description                                                 |
| ---------------------------------------------------------- | ----------------------------------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | The value of the option that has been selected by the user. |

### Remarks

Takes the currently selected integer as a parameter and returns the integer selected by the user.

![EditorGUILayoutIntPopup (IntPopup)](/api/media?file=/engine/6000.0/media/images/EditorGUILayoutIntPopup.png)

*Rescales the current selected GameObject.*

### Examples

```csharp
// Simple Editor Script that lets you rescale the current selected GameObject.
using UnityEditor;
using UnityEngine;

public class IntPopupExample : EditorWindow
{
    int   selectedSize = 1;
    string[] names = new string[] {"Normal", "Double", "Quadruple"};
    int[] sizes = {1, 2, 4};

    [MenuItem("Examples/Int Popup usage")]
    static void Init()
    {
        EditorWindow window = GetWindow(typeof(IntPopupExample));
        window.Show();
    }

    void OnGUI()
    {
        selectedSize = EditorGUILayout.IntPopup("Resize Scale: ", selectedSize, names, sizes);
        if (GUILayout.Button("Scale"))
            ReScale();
    }

    void ReScale()
    {
        if (Selection.activeTransform)
            Selection.activeTransform.localScale =
                new Vector3(selectedSize, selectedSize, selectedSize);
        else
            Debug.LogError("No Object selected, please select an object to scale.");
    }
}
```

## IntPopup(GUIContent, int, GUIContent\[], int\[], GUIStyle, GUILayoutOption\[])

Make an integer popup selection field.

```csharp
public static int IntPopup(GUIContent label, int selectedValue, GUIContent[] displayedOptions, int[] optionValues, GUIStyle style, params GUILayoutOption[] options)
```

### Parameters

**** (\[GUIContent]\(/engine/6000.0/script-reference/unityengine/guicontent)): Optional label in front of the field.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The value of the option the field shows.**** (\[GUIContent\[]]\(/engine/6000.0/script-reference/unityengine/guicontent)): An array with the displayed options the user can choose from.**** (\[int\[]]\(https\://learn.microsoft.com/dotnet/api/system.int32)): An array with the values for each option.**** (\[GUIStyle]\(/engine/6000.0/script-reference/unityengine/guistyle)): Optional [GUIStyle](/engine/6000.0/script-reference/unityengine/guistyle.md).**** (\[GUILayoutOption\[]]\(/engine/6000.0/script-reference/unityengine/guilayoutoption)): An optional list of layout options that specify extra layout properties. Any values passed in here will override settings defined by the style.\
&#x20;Additional Resources: [GUILayout.Width](/engine/6000.0/script-reference/unityengine/guilayout/width.md), [GUILayout.Height](/engine/6000.0/script-reference/unityengine/guilayout/height.md), [GUILayout.MinWidth](/engine/6000.0/script-reference/unityengine/guilayout/minwidth.md), [GUILayout.MaxWidth](/engine/6000.0/script-reference/unityengine/guilayout/maxwidth.md), [GUILayout.MinHeight](/engine/6000.0/script-reference/unityengine/guilayout/minheight.md), [GUILayout.MaxHeight](/engine/6000.0/script-reference/unityengine/guilayout/maxheight.md), [GUILayout.ExpandWidth](/engine/6000.0/script-reference/unityengine/guilayout/expandwidth.md), [GUILayout.ExpandHeight](/engine/6000.0/script-reference/unityengine/guilayout/expandheight.md).

### Returns

| Type                                                       | Description                                                 |
| ---------------------------------------------------------- | ----------------------------------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | The value of the option that has been selected by the user. |

### Remarks

Takes the currently selected integer as a parameter and returns the integer selected by the user.

![EditorGUILayoutIntPopup (IntPopup)](/api/media?file=/engine/6000.0/media/images/EditorGUILayoutIntPopup.png)

*Rescales the current selected GameObject.*

### Examples

```csharp
// Simple Editor Script that lets you rescale the current selected GameObject.
using UnityEditor;
using UnityEngine;

public class IntPopupExample : EditorWindow
{
    int   selectedSize = 1;
    string[] names = new string[] {"Normal", "Double", "Quadruple"};
    int[] sizes = {1, 2, 4};

    [MenuItem("Examples/Int Popup usage")]
    static void Init()
    {
        EditorWindow window = GetWindow(typeof(IntPopupExample));
        window.Show();
    }

    void OnGUI()
    {
        selectedSize = EditorGUILayout.IntPopup("Resize Scale: ", selectedSize, names, sizes);
        if (GUILayout.Button("Scale"))
            ReScale();
    }

    void ReScale()
    {
        if (Selection.activeTransform)
            Selection.activeTransform.localScale =
                new Vector3(selectedSize, selectedSize, selectedSize);
        else
            Debug.LogError("No Object selected, please select an object to scale.");
    }
}
```

## IntPopup(SerializedProperty, GUIContent\[], int\[], GUILayoutOption\[])

Make an integer popup selection field.

```csharp
public static void IntPopup(SerializedProperty property, GUIContent[] displayedOptions, int[] optionValues, params GUILayoutOption[] options)
```

### Parameters

**** (\[SerializedProperty]\(/engine/6000.0/script-reference/unityeditor/serializedproperty)): The value of the option the field shows.**** (\[GUIContent\[]]\(/engine/6000.0/script-reference/unityengine/guicontent)): An array with the displayed options the user can choose from.**** (\[int\[]]\(https\://learn.microsoft.com/dotnet/api/system.int32)): An array with the values for each option.**** (\[GUILayoutOption\[]]\(/engine/6000.0/script-reference/unityengine/guilayoutoption)): An optional list of layout options that specify extra layout properties. Any values passed in here will override settings defined by the style.\
&#x20;Additional Resources: [GUILayout.Width](/engine/6000.0/script-reference/unityengine/guilayout/width.md), [GUILayout.Height](/engine/6000.0/script-reference/unityengine/guilayout/height.md), [GUILayout.MinWidth](/engine/6000.0/script-reference/unityengine/guilayout/minwidth.md), [GUILayout.MaxWidth](/engine/6000.0/script-reference/unityengine/guilayout/maxwidth.md), [GUILayout.MinHeight](/engine/6000.0/script-reference/unityengine/guilayout/minheight.md), [GUILayout.MaxHeight](/engine/6000.0/script-reference/unityengine/guilayout/maxheight.md), [GUILayout.ExpandWidth](/engine/6000.0/script-reference/unityengine/guilayout/expandwidth.md), [GUILayout.ExpandHeight](/engine/6000.0/script-reference/unityengine/guilayout/expandheight.md).

## IntPopup(SerializedProperty, GUIContent\[], int\[], GUIContent, GUILayoutOption\[])

Make an integer popup selection field.

```csharp
public static void IntPopup(SerializedProperty property, GUIContent[] displayedOptions, int[] optionValues, GUIContent label, params GUILayoutOption[] options)
```

### Parameters

**** (\[SerializedProperty]\(/engine/6000.0/script-reference/unityeditor/serializedproperty)): The value of the option the field shows.**** (\[GUIContent\[]]\(/engine/6000.0/script-reference/unityengine/guicontent)): An array with the displayed options the user can choose from.**** (\[int\[]]\(https\://learn.microsoft.com/dotnet/api/system.int32)): An array with the values for each option.**** (\[GUIContent]\(/engine/6000.0/script-reference/unityengine/guicontent)): Optional label in front of the field.**** (\[GUILayoutOption\[]]\(/engine/6000.0/script-reference/unityengine/guilayoutoption)): An optional list of layout options that specify extra layout properties. Any values passed in here will override settings defined by the style.\
&#x20;Additional Resources: [GUILayout.Width](/engine/6000.0/script-reference/unityengine/guilayout/width.md), [GUILayout.Height](/engine/6000.0/script-reference/unityengine/guilayout/height.md), [GUILayout.MinWidth](/engine/6000.0/script-reference/unityengine/guilayout/minwidth.md), [GUILayout.MaxWidth](/engine/6000.0/script-reference/unityengine/guilayout/maxwidth.md), [GUILayout.MinHeight](/engine/6000.0/script-reference/unityengine/guilayout/minheight.md), [GUILayout.MaxHeight](/engine/6000.0/script-reference/unityengine/guilayout/maxheight.md), [GUILayout.ExpandWidth](/engine/6000.0/script-reference/unityengine/guilayout/expandwidth.md), [GUILayout.ExpandHeight](/engine/6000.0/script-reference/unityengine/guilayout/expandheight.md).

## IntPopup(SerializedProperty, GUIContent\[], int\[], GUIContent, GUIStyle, GUILayoutOption\[])

Make an integer popup selection field.

> **Warning:**
>
> **Deprecated.** This function is obsolete and the style is not used.

```csharp
public static void IntPopup(SerializedProperty property, GUIContent[] displayedOptions, int[] optionValues, GUIContent label, GUIStyle style, params GUILayoutOption[] options)
```

### Parameters

**** (\[SerializedProperty]\(/engine/6000.0/script-reference/unityeditor/serializedproperty)): The value of the option the field shows.**** (\[GUIContent\[]]\(/engine/6000.0/script-reference/unityengine/guicontent)): An array with the displayed options the user can choose from.**** (\[int\[]]\(https\://learn.microsoft.com/dotnet/api/system.int32)): An array with the values for each option.**** (\[GUIContent]\(/engine/6000.0/script-reference/unityengine/guicontent)): Optional label in front of the field.**** (\[GUIStyle]\(/engine/6000.0/script-reference/unityengine/guistyle)): **** (\[GUILayoutOption\[]]\(/engine/6000.0/script-reference/unityengine/guilayoutoption)): An optional list of layout options that specify extra layout properties. Any values passed in here will override settings defined by the style.\
&#x20;Additional Resources: [GUILayout.Width](/engine/6000.0/script-reference/unityengine/guilayout/width.md), [GUILayout.Height](/engine/6000.0/script-reference/unityengine/guilayout/height.md), [GUILayout.MinWidth](/engine/6000.0/script-reference/unityengine/guilayout/minwidth.md), [GUILayout.MaxWidth](/engine/6000.0/script-reference/unityengine/guilayout/maxwidth.md), [GUILayout.MinHeight](/engine/6000.0/script-reference/unityengine/guilayout/minheight.md), [GUILayout.MaxHeight](/engine/6000.0/script-reference/unityengine/guilayout/maxheight.md), [GUILayout.ExpandWidth](/engine/6000.0/script-reference/unityengine/guilayout/expandwidth.md), [GUILayout.ExpandHeight](/engine/6000.0/script-reference/unityengine/guilayout/expandheight.md).
