browsersInterface

A game usually needs some interface or UI that is present almost everywhere. This is where the interface comes in handy.

triangle-exclamation

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:

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

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

Last updated