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 <noreply@anthropic.com>
This commit is contained in:
adminandClaude Opus 4.8 committed 2026-06-28 10:39:07 +02:00
1 parent f8b11be290
commit 286473930a
1 file changed
+5
+5
View File
@@ -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;