Pause Menu

An example implementation that you can use directly or as a starting point. You can refer to the demo game samples to see it in action or see the implementation details.

PauseMenuView

Base class with buttons:

  • Continue
  • Load Game
  • Settings
  • Main Menu
  • Quit

Example

csharp
using UnityEngine; using CupkekGames.Core; public class PauseMenuViewExample : PauseMenuView { [Header("Prefab Keys")] [SerializeField] string _settingsMenuKey = "Settings"; [SerializeField] string _loadMenuKey = "SaveLoad"; private void OnButtonContinueClicked() { FadeOutThenDestroy(); } 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(); } }

PauseMenuEscapeAction

Example Usage:

In a visual novel, you might want to prevent going back before the dialogue finishes. Previously, using InputEscapeManager.SetBlocked(true) would block all escape actions (including opening the pause menu). With this new class, you can add the pause menu action to the end of the stack so that the pause menu remains accessible while blocking other back actions.

Settings

Theme

Light

Contrast

Material

Dark

Dim

Material Dark

System

Sidebar(Light & Contrast only)

Light
Dark

Font Family

DM Sans

Wix

Inclusive Sans

AR One Sans

Direction

LTR
RTL