You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
5
5
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
8
+
## [3.1.3] - 2026-02-12
9
+
10
+
### Fixed
11
+
12
+
-**ViewDismissalInputHandler**: Closing the current view is now delayed to the next frame. This avoids `IndexOutOfRangeException` errors in `InputSystemUIInputModule` when `UI/Cancel` is bound to `Esc` and closing a view changes action maps.
13
+
-**ActionMapManager**:
14
+
- After any view switch, default action maps are checked and applied again. This makes sure `defaultActionMaps` are used when the last non-root view in a menu chain is closed.
15
+
-`CheckAndApplyDefaults()` now uses `SentinalManager.AnyNonRootViewsOpen` to decide when defaults should be active. Defaults are applied whenever there are no non-root views open.
Copy file name to clipboardExpand all lines: README.md
+57-57Lines changed: 57 additions & 57 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Sentinal - Unity Menu Navigation & UI Selection System
2
2
3
-
A Unity package for managing hierarchical menu navigation with history tracking, input system integration, and automatic UI element selection. Perfect for game menus, settings panels, and any UI that requires structured navigation flow.
3
+
A Unity package for managing menu navigation with history tracking, input system integration, and automatic UI element selection. Perfect for game menus, settings panels, and any UI that requires structured navigation flow.
4
4
5
5
> [!NOTE]
6
6
> This does not replace **UGUI's navigation system.**
-**Menu/View Tracking**: Navigate through multiple menus with automatic history tracking.
41
-
-**Priority-Based Focus**: Views are focused based on priority (higher priority first), with recency as tie-breaker.
42
-
-**UI Selection**: Auto-selection of UI elements with memory of last selected items.
43
-
-**Root Views**: Views that don't get auto-closed and have special permissions around being closed; can still be hidden (`rootView`).
44
-
-**Exclusive Views**: Views that close all other views (except root views) when opened.
40
+
-**Menu/View Tracking**: Navigate through multiple menus with automatic history tracking.
41
+
-**Priority-Based Focus**: Views are focused based on priority (higher priority first), with recency as tie-breaker.
42
+
-**UI Selection**: Auto-selection of UI elements with memory of last selected items.
43
+
-**Root Views**: Views that don't get auto-closed and have special permissions around being closed; can still be hidden (`rootView`).
44
+
-**Exclusive Views**: Views that close all other views (except root views) when opened.
45
45
46
46
### Input System Integration
47
47
48
-
-**Action Map Overlays**: Intelligent action map management that tracks enabled/disabled maps per view.
49
-
-**Per-View Input Gating**: Enable/disable input for specific views based on focus.
50
-
-**Single or Multi-Player**: Support for single PlayerInput or apply to all players simultaneously.
51
-
-**Efficient Switching**: Recomputes action maps when switching between menus, not just on close.
52
-
-**Configurable Actions**: Customisable input actions for canceling and re-selecting.
53
-
-**Default Action Maps**: Configure action maps to apply when no non-root views are open (e.g., gameplay maps when only HUD/main menu is visible).
54
-
-**Flexible Action Map Configuration**: Use `ActionMapConfig` to specify both action map names and their enabled/disabled state for when views are enabled or disabled.
55
-
-**Dual Event System Support**: Supports both C# Events (`InvokeCSharpEvents`) and Unity Events (`InvokeUnityEvents`) notification behaviors on `PlayerInput`.
48
+
-**Action Map Overlays**: Intelligent action map management that tracks enabled/disabled maps per view.
49
+
-**Per-View Input Gating**: Enable/disable input for specific views based on focus.
50
+
-**Single or Multi-Player**: Support for single PlayerInput or apply to all players simultaneously.
51
+
-**Efficient Switching**: Recomputes action maps when switching between menus, not just on close.
52
+
-**Configurable Actions**: Customisable input actions for canceling and re-selecting.
53
+
-**Default Action Maps**: Configure action maps to apply when no non-root views are open (e.g., gameplay maps when only HUD/main menu is visible).
54
+
-**Flexible Action Map Configuration**: Use `ActionMapConfig` to specify both action map names and their enabled/disabled state for when views are enabled or disabled.
55
+
-**Dual Event System Support**: Supports both C# Events (`InvokeCSharpEvents`) and Unity Events (`InvokeUnityEvents`) notification behaviors on `PlayerInput`.
56
56
57
57
## CORE COMPONENTS
58
58
@@ -64,18 +64,18 @@ The central manager that handles all view/menu navigation logic and maintains th
64
64
65
65
**Public API:**
66
66
67
-
-`CloseCurrentView()` - Close the focused view in the stack.
68
-
-`CloseAllViews()` - Close all views (optionally excluding root views).
69
-
-`TrySelectCurrentView()` - Attempt to select the focused view's UI element.
70
-
-`AnyViewsOpen` - Check if any views are currently open.
71
-
-`CurrentView` - Get the currently focused view selector (priority + recency).
72
-
-`MostRecentView` - Get the most recently opened view selector.
67
+
-`CloseCurrentView()` - Close the focused view in the stack.
68
+
-`CloseAllViews()` - Close all views (optionally excluding root views).
69
+
-`TrySelectCurrentView()` - Attempt to select the focused view's UI element.
70
+
-`AnyViewsOpen` - Check if any views are currently open.
71
+
-`CurrentView` - Get the currently focused view selector (priority + recency).
72
+
-`MostRecentView` - Get the most recently opened view selector.
73
73
74
74
**Events:**
75
75
76
-
-`OnAdd` - Fired when a new view is added to the stack.
77
-
-`OnRemove` - Fired when a view is removed from the stack.
78
-
-`OnSwitch` - Fired when switching between views.
76
+
-`OnAdd` - Fired when a new view is added to the stack.
77
+
-`OnRemove` - Fired when a view is removed from the stack.
78
+
-`OnSwitch` - Fired when switching between views.
79
79
80
80
### `ViewSelector` (Menu Component)
81
81
@@ -87,31 +87,31 @@ Add this to any GameObject that represents a menu or navigable view. One that wi
Recommended placement: **same GameObject as `SentinalManager`**.
117
117
@@ -121,17 +121,17 @@ Recommended placement: **same GameObject as `SentinalManager`**.
121
121
122
122
Per-view handler that can:
123
123
124
-
-Enable/disable “input enabled” state depending on whether the view is the current view (`InputOnlyWhenCurrent`).
125
-
-(Optionally) Apply action map changes when enabled or disabled.
124
+
- Enable/disable “input enabled” state depending on whether the view is the current view (`InputOnlyWhenCurrent`).
125
+
- (Optionally) Apply action map changes when enabled or disabled.
126
126
127
127
Key fields:
128
128
129
-
-`inputOnlyWhenCurrent` (default true)
130
-
-`viewSelector` (optional, but required if `inputOnlyWhenCurrent` is true)
131
-
-`playerInput` / `playerIndex`
132
-
-`applyToAllPlayers`
133
-
-`onEnabledActionMaps` - Action maps to configure when this handler is **enabled** (view is active). Each entry specifies the action map name and whether to enable or disable it.
134
-
-`onDisabledActionMaps` - Action maps to configure when this handler is **disabled** (view is inactive). Each entry specifies the action map name and whether to enable or disable it.
129
+
-`inputOnlyWhenCurrent` (default true)
130
+
-`viewSelector` (optional, but required if `inputOnlyWhenCurrent` is true)
131
+
-`playerInput` / `playerIndex`
132
+
-`applyToAllPlayers`
133
+
-`onEnabledActionMaps` - Action maps to configure when this handler is **enabled** (view is active). Each entry specifies the action map name and whether to enable or disable it.
134
+
-`onDisabledActionMaps` - Action maps to configure when this handler is **disabled** (view is inactive). Each entry specifies the action map name and whether to enable or disable it.
135
135
136
136
### `ActionMapManager` (Input System: Global Action Map Coordinator)
137
137
@@ -141,14 +141,14 @@ Singleton that tracks and manages action map overlays across views using `ViewIn
141
141
142
142
**Key features:**
143
143
144
-
-**Default Action Maps**: Configure action maps to apply when no non-root views are open (controlled by `useDefaultActionMaps` toggle).
145
-
-**Action Map History**: Tracks the latest action map state per view selector (source); the same selector overwrites its previous entry. Editor shows one row per view with player index, action type (Enable/Disable/Restore), and map names.
146
-
-**Automatic Restoration**: Restores action maps to their previous state when views are closed or disabled.
144
+
-**Default Action Maps**: Configure action maps to apply when no non-root views are open (controlled by `useDefaultActionMaps` toggle).
145
+
-**Action Map History**: Tracks the latest action map state per view selector (source); the same selector overwrites its previous entry. Editor shows one row per view with player index, action type (Enable/Disable/Restore), and map names.
146
+
-**Automatic Restoration**: Restores action maps to their previous state when views are closed or disabled.
147
147
148
148
**Configuration:**
149
149
150
-
-`useDefaultActionMaps` - If true, applies `defaultActionMaps` when no non-root views are open. If false, uses current in-memory state.
151
-
-`defaultActionMaps` - Array of `ActionMapConfig` entries specifying which action maps to enable/disable when only root views are open.
150
+
-`useDefaultActionMaps` - If true, applies `defaultActionMaps` when no non-root views are open. If false, uses current in-memory state.
151
+
-`defaultActionMaps` - Array of `ActionMapConfig` entries specifying which action maps to enable/disable when only root views are open.
**Note:** If `PlayerInput.notificationBehavior` is set to `SendMessages` or `BroadcastMessages`, Sentinal will automatically change it to `InvokeCSharpEvents` at runtime and log a warning. Update the setting in the inspector to avoid runtime changes.
238
238
@@ -242,10 +242,10 @@ Sentinal supports both **C# Events** (`InvokeCSharpEvents`) and **Unity Events**
242
242
243
243
The custom editor shows real-time debugging information:
244
244
245
-
-**SentinalManager**: Shows focused view vs most recent view, view list with priority and input state.
-**ViewInputSystemHandler**: Shows input enabled state and action map configuration (Input System).
248
-
-**ActionMapManager**: Shows player count, “Action maps per view” (latest state per view selector, sorted by source), and per-player current action map with enabled maps list.
245
+
-**SentinalManager**: Shows focused view vs most recent view, view list with priority and input state.
-**ViewInputSystemHandler**: Shows input enabled state and action map configuration (Input System).
248
+
-**ActionMapManager**: Shows player count, “Action maps per view” (latest state per view selector, sorted by source), and per-player current action map with enabled maps list.
0 commit comments