
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.
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.
Names of InputActions that will trigger escape when performed. See UIViewActionEscape for more info.
Input icons for InputPromt components.
Enables all other action maps on start. Optionally, loading transitions with input disables other action maps during the loading screen.
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.
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.
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.
Methods for handling player join and leave events in multiplayer scenarios. Automatically handled by PlayerInputManager so you don't need to call these manually.
public void OnPlayerJoined(PlayerInput playerInput)
public void OnPlayerLeft(PlayerInput playerInput)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.
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.
public void SetBlocker(VisualElement blocker)
// or
public void SetBlocker(string elementName)If you want, you can remove blocker manually.
public void RemoveBlocker()Info: The "disableOtherViewsOnFadeIn" option on UIView uses these functions.
/// <param name="exceptPages">Pages to ignore.</param>
/// <returns>
/// List of disabled elements.
/// </returns>
public List<VisualElement> SetEnabledAllPages(bool enabled, params VisualElement[] exceptPages)
// or
public List<VisualElement> SetEnabledAllPages(bool enabled, HashSet<VisualElement> exceptPages)public void SetEnabledPage(VisualElement page, bool enabled, HashSet<VisualElement> exceptElements)Enables or disables a specific set of VisualElements. Useful for controlling individual elements or custom groups.
public void SetEnabledElements(bool enabled, HashSet<VisualElement> elements)Info: You don't need to manually register elements when using UIViews.
However, for documentation purposes, the functions are detailed here.
public void RegisterPage(VisualElement parent)Returns the predefined duration of fade transitions. Note that it does not reflect the current active transition duration.
public void UnregisterPage(VisualElement parent)public HashSet<VisualElement> GetPage(VisualElement parent)public void RegisterElement(VisualElement parent, VisualElement item)public void UnregisterElement(VisualElement parent, VisualElement item)The Global UIView Registry tracks all UIViews in the scene, enabling you to apply USS classes to all views at once. This is particularly useful for locale-based styling and runtime USS class management.
Returns a read-only collection of all registered UIViews in the scene. Automatically removes invalid views (where ParentElement is null or destroyed).
public IReadOnlyCollection<UIView> GetAllUIViews()Adds a USS class to the root element of all registered UIViews. The class will be automatically applied to any UIViews that register in the future.
public void AddClassToAllUIViews(string className)Use Case: Locale-based styling, runtime USS class management. See Runtime Style Switching for an example.
Removes a USS class from the root element of all registered UIViews. The class will no longer be applied to UIViews that register in the future.
public void RemoveClassFromAllUIViews(string className)Info: You don't need to manually register UIViews. Registration happens automatically when a UIView is constructed.
However, for documentation purposes, the function is detailed here.
Registers a UIView to the global registry. Applies any globally tracked classes to the newly registered view.
public void RegisterUIView(UIView view)Info: You typically don't need to manually unregister UIViews. Unregistration happens automatically when a UIView is destroyed via
UIViewReference.OnDestroy().However, for documentation purposes, the function is detailed here.
Unregisters a UIView from the global registry.
public void UnregisterUIView(UIView view)Settings
Theme
Light
Contrast
Material
Dark
Dim
Material Dark
System
Sidebar(Light & Contrast only)
Font Family
DM Sans
Wix
Inclusive Sans
AR One Sans
Direction