How to make event trigger with custom events??

Hi, I’m not sure if anybody can help with this problem, but here’s the thing:

I’m trying to make system based on single manager, invoking events (about current level states), and listeners that will react to this events. Example:


And I would like to be able to set reactions similar to event trigger, but with custom defined events.
167931-eventtriggerpng.png


Is there any way to make similar component to event trigger, where it will be possible to use custom list of events (that wil be defined either in manager or separately)? Or is there even some better solution for this situation? If you have any idea, I’ll be glad for any tip or advice, thanks.

It seems like you want to use UnityEvent. Just decalare a variable like:

public UnityEvent NameOfVariable;

It will show up in the inspector just like the pointer exit and enter events you have there. When you want to call the event just use:

NameOfVariable.Invoke();