The Event System
In Chapter 2, Canvases, Panels, and Basic Layouts, we learned that when the first Canvas is added to a scene, a GameObject named EventSystem is automatically added to the Hierarchy. The Event System allows you to easily receive player interaction and send those interactions to objects in your scene through events. Note that I said "objects in your scene" and not "UI objects". The Event System allows you to send events to non-UI items, too!
Before we proceed, I'd like to note my use of EventSystem (one word) and Event System (two words), because I will be switching back and forth between the two. I want you to know that I am doing it deliberately and am not just randomly deciding that sometimes I hate the spacebar.
I will ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access