> For the complete documentation index, see [llms.txt](https://saitama-studio.gitbook.io/essential-systems/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://saitama-studio.gitbook.io/essential-systems/systems/inputs.md).

# Inputs

Managing player inputs can quickly become overwhelming. Essential Systems streamlines the process with Inputs, making changes and customization effortless.

<figure><img src="https://3846168334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhjeEdzvIH0d5vrHiguxu%2Fuploads%2FT4keITA6c0hqaSLMKhEy%2FMedia03.png?alt=media&amp;token=d3582dde-d90a-4a20-a56a-e2d46894928b" alt=""><figcaption></figcaption></figure>

To handle all inputs we use the `Input Manager` script. You can add this to any game object in the scene hierarchy (it will become `DontDestroyOnLoad` scene gets loaded.

{% hint style="warning" %}
There **must** always be exactly **one** `Input Manager` at any time.
{% endhint %}

<figure><img src="https://3846168334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhjeEdzvIH0d5vrHiguxu%2Fuploads%2FqWyqUAHtexwcam9Qy2th%2Fimage.png?alt=media&amp;token=6bfed809-f4e5-4437-ba9a-c7a2dd6a7a23" alt=""><figcaption></figcaption></figure>

To actually assign inputs and keybindings we create and use `Input` objects. You can create your own by right-clicking anywhere in the project and go to `Create/Essentials/Inputs/<your desired input system>/Input`. This will create a new `Input` object where you can define which keys/reference to Input Action Asset. One `Input` can contain multiple keys that all maps to the same action.

### Standard Input System

The `Input` object also comes with a `Scheme` property. This is where you can define where the input can be used.&#x20;

### New Input System

Here, we do **not** provide a `Scheme` property. Instead, you **must** add **all** `EScheme` entries to the `Action Map` in the `Player Input` with the **exact** same name and casing.

<figure><img src="https://3846168334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhjeEdzvIH0d5vrHiguxu%2Fuploads%2FGrtGZhxUVUKjeW1LMIXY%2Fimage.png?alt=media&amp;token=3f5c6c27-b082-4765-ab10-dfed5d0e736f" alt=""><figcaption></figcaption></figure>

An `EScheme` is a way for you to tell the `Input Manager` what scope it should listen to inputs in. For example; if you have a pause menu and you pause the game, you may only want to listen to UI inputs and ignore all player inputs. This can be done using `Scheme`.

To set the current `Scheme` in runtime, you can simply call:

```csharp
InputManager.Scheme = EScheme.UI; // UI can be changed to anything (PLAYER, etc.)
```

By default, only two pre-made schemes are available, `UI` and `DEFAULT`. You can add your own by opening the `Input Manager` script. At the top of the script, you will find an enum; `EScheme`. Here you can simply add your entry (if you are using the `New Input System` you must also add it to the `Action Map`).

<figure><img src="https://3846168334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhjeEdzvIH0d5vrHiguxu%2Fuploads%2FJRGS5cxnuBCT9c1jWzBp%2Fimage.png?alt=media&amp;token=787cfcaa-a2a2-4de8-9dda-69828f5b1a30" alt=""><figcaption></figcaption></figure>
