From 286473930a9d8fdbac66d7979e8f5a3bca4c3a8b Mon Sep 17 00:00:00 2001 From: MelekTaus Moribundus Date: Sun, 28 Jun 2026 10:39:07 +0200 Subject: [PATCH] Close the paint HUD when shutting down to player-less Main ReleaseToNoPlayer tore down the mode cycle but never raised ModeChanged, so the paint HUD - which only hides via that event - stayed open after a shutdown that happened while PaintMode was active. Invoke ModeChanged(null) after the teardown so any mode-following UI hides. Co-Authored-By: Claude Opus 4.8 --- Assets/Scripts/GameModeManager.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Assets/Scripts/GameModeManager.cs b/Assets/Scripts/GameModeManager.cs index d9804f9..9fea14b 100644 --- a/Assets/Scripts/GameModeManager.cs +++ b/Assets/Scripts/GameModeManager.cs @@ -223,6 +223,11 @@ public class GameModeManager : MonoBehaviour painter = null; PainterChanged?.Invoke(null); + // No SwitchTo runs here (the cycle is now empty), so notify mode-following UI explicitly that + // there is no active mode - otherwise the paint HUD, which only hides via ModeChanged, would stay + // open back in Main after a shutdown that happened while PaintMode was active. + ModeChanged?.Invoke(null); + if (cameraInput) cameraInput.LookMode = ThirdPersonOrbitInput.OrbitLookMode.Disabled;