# New Input System - Open Menu

How to use Input with on screen buttons.

{% embed url="<https://www.youtube.com/watch?v=SXBgBmUcTe0>" %}

{% embed url="<https://www.youtube.com/watch?v=e30i55Hp-to>" %}

## Disabling Movement for UI

To switch to UI, you can change the Action Map. You need to set the default action map in the previous section first before switching.

```csharp
using UnityEngine.InputSystem;

...

[SerializeField] private PlayerInput playerInput;

public void OnOpenMenu(InputAction.CallbackContext ctx)
    {
        Debug.Log("UI Should Open");
        playerInput.SwitchCurrentActionMap("UI");
    }

```

Alternately, You can switch the Action Map in the Inspector of the PlayerInputComponent.

<figure><img src="/files/WgNjjm3wCO0VkLBt65SL" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://roxioxx.gitbook.io/unity-cookbook/ui-onlyfans/new-input-system-open-menu.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
