Skip to main content
Supported on
Snapchat

Game Manager

A ready-made game state machine for multiplayer Lenses, available in the Asset Library. Each state is a child object you fill with your own content. The state machine switches state locally; to keep shared states in step across clients, pair it with a replication script, the way the starter project's GameStatesSynchronizer replicates its shared states while per-player states, such as spectator, stay local.

States

  • Loading State
  • Main Menu State
  • Game State, with Active State and Spectator State
  • Player Win Notification State
  • End State
  • Error State, with Connection Lost, Device Unsupported, Matchmaking Error, Matchmaking Rejected By User, and No Match Found

The error states matter as much as the happy path: each one is a screen a player will eventually see.

See it in use

The Multiplayer Game Starter Project ships with the Game Manager wired into a complete game, including the scripts that drive it: GameStateController runs the machine and GameStatesSynchronizer replicates the shared state switches.

Was this page helpful?
Yes
No