UnityEventAddListener
UnityEventAddListener is a method used in the Unity game engine to add a listener to a UnityEvent. UnityEvent is a class that allows for the creation of custom events in Unity, which can be used to trigger functions or methods when certain conditions are met. The AddListener method is used to subscribe a method to the event, so that when the event is invoked, the subscribed method is called.
The AddListener method takes a single parameter, which is a delegate representing the method to be called
When the event is invoked using the Invoke method, all of the subscribed methods are called in
UnityEventAddListener is a powerful tool for creating custom events and managing the flow of data and control