game-state-management
Game flow and runtime state in Unity and C# - game state machine for boot, menu, loading, playing, paused and game over, stack states for pause and overlays, scene loading flow with additive and async loads, bootstrap scene and loading screens, Time.timeScale pause pitfalls, runtime vs persistent state, single source of truth and state ownership, state change events, session and run data, persistent service lifetime and DontDestroyOnLoad, static state with domain reload disabled, and testing state machines. Load when designing game flow, pause, scene transitions, global services, or debugging state that leaks between sessions or scenes.
Pinned to revision c74eff4a9f08, so it is the text this page describes rather than whatever the author pushed since.
Files
Every link opens the file at its source, pinned to the revision this page describes.