An overview of the Event Bus Pattern

There's a possible point of confusion around the Event Bus pattern. It's sometimes referred to as a Messaging System or the Publish-Subscribe pattern, the latter being the most accurate name for what we are implementing in this chapter. But because we are taking a very hands-on approach to this book, we are going to refer to this pattern's design as an Event Bus, which is a more high-level and system-oriented name for it.

As we have seen in Chapter 9Observer, C# has native implementations that simplify the process of integrating events by offering an event-driven mechanism that permits Subjects and Observers to communicate with each other. But C#'s native event system does have a drawback – observers ...

Get Hands-On Game Development Patterns with Unity 2019 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.