Singletons & Managers

A singleton is a class that guarantees exactly one instance of itself and gives the rest of the game a global way to reach it. In Unity it shows up as a GameManager, an AudioManager, or a SaveManager that survives scene loads. For a few app-wide services it is fine. Used everywhere, it turns a project into a tangle nobody can test.

More in Architecture

  1. Singletons & Managers
  2. Observer & Events
  3. State Machines
  4. Composition & Dependency Injection

All 42 topics in the Learn Unity Roadmap