Debug Mode is a checkbox on the Game Manager. It tells the framework that you are running a level directly out of the Editor rather than booting the game properly, and systems across the framework adjust accordingly.
The problem it solves: a GS_Play project normally boots to a title stage, waits for the player to start a game, then loads the first level and places the player. Pressing play on the level you are currently editing should not do any of that — it should just run this level, now.
For usage guides and setup examples, see The Basics: GS_Core.
Contents
What Changes
Debug Mode is a single flag, but three systems consult it, and together they turn “boot the game” into “run this level”.
Game Manager — the game begins on its own
Normally startup completing means the framework is ready, and the game itself begins when your project decides it does — a title screen, a New Game button, a cutscene ending.
In Debug Mode, the Game Manager calls begin-game itself as soon as startup completes. OnBeginGame fires with no title flow, so gameplay systems come up immediately.
Stage Manager — you stay in the level you are editing
Normally the Stage Manager loads the project’s configured starting stage once startup completes, unloading whatever level you happened to be in.
In Debug Mode, if the current level has a Stage Data component, the Stage Manager adopts that level as the current stage instead of loading the default one. You keep working in the level you pressed play on.
If the level has no Stage Data, there is nothing to adopt and the default stage loads as usual — which is a useful thing to know when a level unexpectedly navigates away from itself.
Unit Manager — the player is placed for you
Normally a player unit waits for the correct level to load and for the game flow to position it.
In Debug Mode, the Unit Manager places the player unit at the debug exit point as soon as it registers, so you get a controllable character in the level without a stage transition having happened.
Reading the Flag
IsInDebug on the Game Manager request bus returns the flag, and it is exposed to scripts as In Debug.
Every manager already reads it. GS_ManagerComponent queries it during activation and caches it, so any manager subclass has the answer available without asking again.
Debug Mode is not a build configuration
It is an authored property on a Game Manager instance, not a compile-time or launcher setting. A Game Manager prefab shipped with Debug Mode ticked will auto-begin the game and skip your title flow in a packaged build. Treat it as an editor convenience and confirm it is off in the prefab you ship.Using It in Your Own Manager
The pattern the built-in managers follow is worth copying: branch on the flag anywhere your system’s behaviour depends on how the game was started rather than on the game’s state.
Typical uses:
- Skip a wait. If your manager normally waits for a game-flow cue that debug startup never sends, act immediately instead.
- Substitute a stand-in. Provide a debug default where a real session would have supplied something — a placeholder save, a default loadout, a starting position.
- Say more. The framework’s managers print what they are doing in debug. Combine with Logging Depth on the individual manager you are diagnosing.
A custom manager reads the cached flag it inherits from the manager base, so there is nothing to wire up — the value is populated before your setup hook runs.
The manager component template already includes the query, so a scaffolded manager has the flag available from its first build.
See Also
For related systems:
- Game Manager — where the flag is authored
- Manager (Base) — caches the flag for every manager
- Stage Manager — the level-loading branch
- ImGui Debug Menu — the other in-game debug surface
For conceptual overviews and usage guides:
Get GS_Core
GS_Core — Explore this gem on the product page and add it to your project.