Observer & Events

The observer pattern lets one object announce that something happened while any number of other objects react, without the announcer knowing who is listening. In Unity that is how a health script tells the health bar, the hit sound, and the achievement tracker about damage without holding a reference to any of them.

More in Architecture

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

All 42 topics in the Learn Unity Roadmap