C# scripts and the UI Event System in Unity
EventSystem is a mechanism for sending events to objects in a game that supports keyboards, mice, screen touches, and so on. EventSystem consists of multiple modules for sending events. If there is no EventSystem object in the scene, then, when creating a canvas, an EventSystem object will be automatically created along with it.
As shown in Figure 3.36, the Inspector window of the EventSystem object exposes very few functionalities. This is because EventSystem is designed as a manager for cooperation between various input modules.
It should be noted that there can be, at most, one EventSystem object in a scene. If there are multiple EventSystem objects in the scene, a warning message will be displayed, as shown in Figure 3.37:
When the game is running, EventSystem will look...