Luna UI Manager

uimanager

Settings

Input Settings

Player Input

A Player Input reference is required for the proper functioning of Escape Action InputPromt component. Represents a single player's input device. Sufficient for singleplayer games.

Player Input Manager

When set, overrides the standalone PlayerInput above. Solution for local multiplayer. Enables multiple players to join and leave the game dynamically. See documentation for more info.

Escape Action Names

Names of InputActions that will trigger escape when performed. See UIViewActionEscape for more info.

Input Icon Database

Input icons for InputPromt components.

Loading Action Maps

Enables all other action maps on start. Optionally, loading transitions with input disables other action maps during the loading screen.

UI Element Manager Settings

Blacklist

List of VisualElement names to ignore. UIElementManager automatically adds hover and click sounds to focusable elements. Add elements here if you cannot disable their focusable state but do not want sounds applied to them.

Integration with Other Components

InputDeviceManager Integration

LunaUIManager automatically initializes and manages the InputDeviceManager. It calls InputDeviceManager.OnEnable() with the configured escape action names and loading action maps, and handles player input registration through the OnPlayerJoined and OnPlayerLeft events.

InputPrompt Integration

The LunaUIManager provides the IconDatabase property that InputPrompt components use to display appropriate input icons for different control schemes. InputPrompt components automatically query this database to get the correct sprites and text for the current input method.

Input Methods

Player Input Events

Methods for handling player join and leave events in multiplayer scenarios. Automatically handled by PlayerInputManager so you don't need to call these manually.

UI Element Manager

UI Element Manager is a feature within the Luna UI Manager.

Manages the registration and state of VisualElement instances within a hierarchy of VisualElement containers. It provides functionality for enabling and disabling groups of elements, which is particularly useful for managing UI navigation.

Automatically adds audio feedback to interactable elements like buttons.

Additionally, it includes functionality for setting a blocker element.

Public Methods

SetBlocker

Disables all UI elements and sets a specified VisualElement as the active blocker, ensuring it remains enabled and interactive. When clicked, it will re-enable all previously disabled elements.

RemoveBlocker

If you want, you can remove blocker manually.

SetEnabledAllPages

SetEnabledPage

SetEnabledElements

Enables or disables a specific set of VisualElements. Useful for controlling individual elements or custom groups.

RegisterPage

UnregisterPage

Returns the predefined duration of fade transitions. Note that it does not reflect the current active transition duration.

GetPage

RegisterElement

UnregisterElement