PauseMenuView is an abstract UIViewComponent that wires up Continue / Load / Settings / Main Menu / Quit buttons and provides a working OnButtonContinueClicked() (calls FadeOutThenDestroy()). Subclass it for the rest. PauseMenuEscapeAction lets the pause menu coexist with InputEscapeManager.SetBlocked(true) so it stays accessible during dialogue or cutscenes.

ButtonContinue — Continue (handler provided)ButtonLoad — Load Game (abstract)ButtonSettings — Settings (abstract)ButtonMainMenu — Main Menu (abstract)ButtonQuit — Quit (abstract)PauseMenuView and implement the four abstract handlers.namespace CupkekGames.Luna;
public abstract class PauseMenuView : UIViewComponent| Method | Description |
|---|---|
OnButtonContinueClicked() | Virtual. Default calls FadeOutThenDestroy(). |
OnButtonLoadGameClicked() | Abstract. |
OnButtonSettingsClicked() | Abstract. |
OnButtonMainMenuClicked() | Abstract. |
OnButtonQuitGameClicked() | Abstract. |
OnEnable() / OnDisable() | Virtual. Wire/unwire button handlers. Call base if you override. |
using UnityEngine;
using CupkekGames.Luna;
public class PauseMenuViewExample : PauseMenuView
{
[Header("Prefab Keys")]
[SerializeField] string _settingsMenuKey = "Settings";
[SerializeField] string _loadMenuKey = "SaveLoad";
protected override void OnButtonLoadGameClicked()
=> UIPrefabLoaderString.Instance.Instantiate(_loadMenuKey);
protected override void OnButtonSettingsClicked()
=> UIPrefabLoaderString.Instance.Instantiate(_settingsMenuKey);
protected override void OnButtonMainMenuClicked()
=> SceneLoader.Instance.LoadScene(1, SceneTransitionManager.Instance.Transitions.GetValue("Fade"));
protected override void OnButtonQuitGameClicked()
=> Application.Quit();
}Adds the pause-menu open/close to the InputEscapeManager stack so it remains accessible while other back actions are blocked.
Use case: in a visual novel you want to prevent going back mid-line, but still let the player open the pause menu. Calling InputEscapeManager.SetBlocked(true) would otherwise block everything; PauseMenuEscapeAction adds itself at the end of the stack so the pause menu still triggers.
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