Clean Communication – Interface and Event Observer Patterns
In this chapter, we will explore two design patterns that allow us to improve how actors communicate with each other. Utilizing the interface and event observer patterns to allow us to build better, cleaner communication solutions, reducing memory and processing cost of communication. To explore these, we will expand on the RTS game by implementing a health component that can be added to any actor. We will start by looking at interfaces in C++, following the concepts of the interface design pattern, and then explore the event observer pattern, with an exploration of Event Dispatchers in Blueprint and the implementation of event delegates in C++.
In this chapter, we will cover the following topics:
- Interfacing communication across classes in UE5
- Implementing event delegate communication across UE5