# Interface

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

{% hint style="danger" %}
You **must** add the `Interface <your input system>` to the **build settings**.\
For example: if you're using the New Input System you add the `Interface New` to the build settings.
{% endhint %}

The interface is added to any scene using `LoadScene(scene, LoadSceneMode.Additive)`. This will add the interface on top of the current activated scene.

This can be done a couple of different ways. For example; you can add a script to every scene where you want the interface to accessible that looks something like the following:

```csharp
public class AddInterface : MonoBehaviour
{
    private void Start()
    {
        SceneManager.LoadScene("Interface", LoadSceneMode.Additive);
    }
}
```

Alternatively, we can have a `static method` that adds the interface whenever **any** scene is loaded:

```csharp
public static class AddInterface
{
    [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
    private static void Init()
    {
        SceneManager.LoadScene("Interface", LoadSceneMode.Additive);
    }
}
```

In the interface we can add whatever UI logic we want. For example, as seen in the demo, we can add a `Pause` menu.


---

# 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://saitama-studio.gitbook.io/essential-systems/systems/interface.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.
