GS_Managers

The game lifecycle management system — startup sequencing, systemic navigation, and the extensible manager pattern.

Overview

The Managers system is the backbone of every GS_Play project. It provides a controlled startup sequence that initializes game systems in the right order, global access to those systems via EBus, and systemic navigation (New Game, Load Game, Quit) from a single point of control.

Every GS_Play gem that has a manager component (Save, Stage, UI, Unit, Camera, Audio, etc.) plugs into this system automatically.


Architecture

GameManager Entity Hierarchy

GS_GameManager                   Top-level lifecycle controller
  ├── GS_SaveManager             Persistence (save/load game data)
       ├── GS_Saver             Per-entity save components
       └── RecordKeeper         Simple key-value progression records
  ├── GS_StageManager            Level loading and navigation
       ├── GS_StageData         Per-level anchor and spin-up controller
       └── StageExitPoint       Spawn/exit position markers
  ├── GS_OptionsManager          Options and input profile management
       └── GS_InputProfile      Data asset for input bindings
  └── (Your Custom Managers)     Extend GS_Manager for your own systems

All managers follow the same pattern: they are spawned by the Game Manager, go through a two-stage initialization, and are globally accessible via their EBus interfaces.

Staged Initialization

GS_GameManager (singleton, placed in every level as a prefab)
  ├── Spawns manager prefabs from its "Startup Managers" list
  ├── Stage 1: Initialize
  │     Each manager runs Activate(), then reports OnRegisterManagerInit()
  │     GM waits for ALL managers to report before proceeding
  ├── Stage 2: Startup
  │     GM broadcasts OnStartupManagers()
  │     Each manager connects to other managers, then reports OnRegisterManagerStartup()
  │     GM waits for ALL managers to report before proceeding
  └── Stage 3: Complete
        GM broadcasts OnStartupComplete()
        Game systems are fully ready — UI can spawn, gameplay can begin

This two-stage initialization guarantees that during Stage 2, every manager is already initialized and safe to reference. This eliminates race conditions between interdependent systems.


Components

ComponentPurposeDocumentation
GS_GameManagerComponentTop-level lifecycle controller. Spawns managers, handles New Game / Load / Quit / Standby.Game Manager
GS_ManagerComponentBase class for all game system managers. Handles the two-stage init pattern automatically.Manager

Quick Start

In-level Assembly

  1. Create a Game Manager prefab with the GS_GameManagerComponent.
  2. Create Manager prefabs for each system you need.
  3. Add the manager prefab spawnables to the Game Manager’s Startup Managers list.
  4. Place the Game Manager prefab at the top of every level.
  5. The system handles initialization ordering automatically.

Creating Unique Managers

  1. Use the Manager ClassWizard template, or extend the GS_Manager class manually.
  2. Override any initialization stage methods, or utility methods.
  3. Be sure to call parent methods in any override, otherwise initialization will be missed.
  4. Create a new Prefab with your new Manager, add to the GameManager Prefab Managers list.

See Also


Game Manager

The top-level game lifecycle controller — startup sequencing, systemic navigation, standby mode, and debug support.

Manager

The base class for all game system managers — automatic two-stage initialization and lifecycle integration with the Game Manager.