Unreal uses events for notifying classes about things that happen in the game world in an efficient manner. Events and delegates are useful to ensure that these notifications can be issued in a way which minimizes class coupling, and allows arbitrary classes to subscribe to be notified.
We will cover the following recipes in this chapter:
Handling events implemented via virtual functions
Creating a delegate that is bound to a UFUNCTION
Unregistering a delegate
Creating a delegate that takes input parameters
Passing payload data with a delegate binding
Creating a multicast delegate
Creating a custom Event
Creating a Time of Day handler
Creating a respawning pickup for an First Person Shooter