Simon (darkside) Jackson
Thanks for your question Thomas
At it’s core, the Event system is just an Event manager, a central location where events are marshalled between objects and other events.
The GO in the example you highlight is the “Droid” object, sending the event data directly to that GO. Because the droi implements the “IAlarmHandler” interface, the Event system knows which method to call on the droid.
This means there is a complete disconnect between what calls the event and what receives it. This is important because it means we are not using reflection (Slow) or tight delegate reference (which breaks if you regularly destroy things)
There is no right or wrong answer whether it is right to use the Event System to solve certain issues. If you want to remove all SendMessage and Broadcast uses in your app/game then definitely.
For more complex scenarios, it’s a mix up to whether you want to invest the time to build the full linkage (Interface, UnityEvemt, Handler and so on) or just use a fixed reference.
The best idea is to throw a situation at me and I can walk you through whether the EventSystem and UnityEvent’s are a good fit for it.
The first job is knowing knowing how it works, the harder question is how to apply it effectively 😀
Simon (Darkside) Jackson