UnityEvents
UnityEvents are a powerful feature within the Unity game engine that allow for the creation of event-driven systems. They act as a mechanism to decouple game logic, enabling different parts of a project to communicate with each other without direct dependencies. Essentially, a UnityEvent is a serializable list of listeners that can be invoked at runtime. This means you can define an event in one script and have multiple other scripts subscribe to that event, responding when it is triggered.
The primary use case for UnityEvents is to allow designers to hook up game logic directly in
UnityEvents support different types of events based on the parameters they can pass to their listeners. There