> For the complete documentation index, see [llms.txt](https://ashobot.gitbook.io/ultimate-attributes-pack/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ashobot.gitbook.io/ultimate-attributes-pack/popups.md).

# Popups

<details>

<summary>InputAxis</summary>

Displays a popup in the inspector to select an input axis.

**Supported property types**

* String
* Int

**Parameters**

None.

<mark style="color:purple;">Code Example</mark>

```csharp
using UltimateAttributesPack;

public class InputAxisExample : MonoBehaviour
    {
        // Shows a popup menu to select a specific input axis (returns the index of the input axis)
        [InputAxis]
        public int intInputAxis;

        // It can also be used on string variables to return the name of the input axis
        [InputAxis]
        public string stringInputAxis;
    }
```

<img src="https://3496865040-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxJRT3Vo5QZSbuYGZVtRD%2Fuploads%2FsAo8KVFA2qv1Bu5pYSQ5%2FInputAxis.gif?alt=media&amp;token=88aefcc0-b736-4c06-9a8a-08a45acd4f0e" alt="" data-size="original">

</details>

<details>

<summary>Tag</summary>

Displays a popup in the inspector to select a tag.

**Supported property types**

* String

**Parameters**

None.

<mark style="color:purple;">Code Example</mark>

```csharp
using UltimateAttributesPack;

public class TagExample : MonoBehaviour
    {
        // Tag attribute displays a popup in the inspector to select a tag (only works with string)

        [Tag]
        public string tagName; // Returns the tag name
    }
```

<img src="https://3496865040-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxJRT3Vo5QZSbuYGZVtRD%2Fuploads%2F3MQdyiIkabUEm6Ir5dxB%2FTag.gif?alt=media&amp;token=563fca36-72c9-4ebe-a5a8-0fffd4bd0ad1" alt="" data-size="original">

</details>

<details>

<summary>Scene</summary>

Displays a popup in the inspector to select a scene.

**Supported property types**

* String
* Int

**Parameters**

None.

<mark style="color:purple;">Code Example</mark>

<pre class="language-csharp"><code class="lang-csharp">using UltimateAttributesPack;
<strong>
</strong><strong>public class SceneExample : MonoBehaviour
</strong>    {
        // Scene attribute dislays a popup in the inspector to select a scene (scenes must be in build settings)
        [Scene]
        public int sceneIndex; // Returns the index of the scene if the variable is an int

        [Scene]
        public string sceneName; // Returns the name of the scene if the variable is a string
    }
</code></pre>

<img src="https://3496865040-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxJRT3Vo5QZSbuYGZVtRD%2Fuploads%2FS5kg0Z8MykzgpWNAIjO3%2FScene.gif?alt=media&amp;token=742f9772-463c-45f2-b35e-eb2662cec5f5" alt="" data-size="original">

</details>

<details>

<summary>PredefinedValues</summary>

Displays a button at the right of the variable in the inspector to select a predefined value in parameters. The variable can be changed to a value that is not a predefined value.

**Supported property types**

* String
* Float
* Int

**Parameters**

* Values

<mark style="color:purple;">Code Example</mark>

```csharp
using UltimateAttributesPack;

public class PredefinedValuesExample : MonoBehaviour
    {
        // PredefinedValues attribute displays a button at the right of the variable to open a popup menu and select one of multiples predefined values setted in params
        // The value of the variable can be changed to a value that is not predefined in the params
        [PredefinedValues(0, 2.5f, 5f, 10f, 33.3f)]
        public float predefinedFloatValue;

        // It also works with int and string
        [PredefinedValues(0, 2, 5)]
        public int predefinedIntValue;

        [PredefinedValues(0, "Example Text", "Second Example Text")]
        public string predefinedStringValue;
    }
```

<img src="https://3496865040-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxJRT3Vo5QZSbuYGZVtRD%2Fuploads%2FpMq78cyDrglqDYM9XFos%2FPredefinedValues.gif?alt=media&amp;token=48317c95-a791-4cb0-b7dc-988d74096020" alt="" data-size="original">

</details>

<details>

<summary>PredefinedValuesOnly</summary>

Displays a popup in the inspector to select a predefined value in parameters. The variable can't be changed to a value that is not a predefined value.

**Supported property types**

* String
* Float
* Int

**Parameters**

* Values

<mark style="color:purple;">Code Example</mark>

```csharp
using UltimateAttributesPack;

public class PredefinedValuesOnlyExample : MonoBehaviour
    {
        // PredefinedValuesOnly attribute displays a popup menu to select one of multiples predefined values setted in params
        // The value of the variable can't be changed to a value that is not predefined in the params
        [PredefinedValuesOnly(0, 2.5f, 5f, 10f, 33.3f)]
        public float predefinedFloatValue;

        // It also works with int and string
        [PredefinedValuesOnly(0, 2, 5)]
        public int predefinedIntValue;

        [PredefinedValuesOnly(0, "Example Text", "Second Example Text")]
        public string predefinedStringValue;
    }
```

<img src="https://3496865040-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxJRT3Vo5QZSbuYGZVtRD%2Fuploads%2FpugYfblYGsLZadJe1YSo%2FPredefinedValuesOnly.gif?alt=media&amp;token=55e66840-161c-4b0b-afa5-e9711c8c8b6c" alt="" data-size="original">

</details>

***
