- Home /
What's the best compromise for inspector-using event system?
I'm trying to have a large scale, adaptive, as generic as possible, inspector friendly event system.
The issue that I have is using the unityevents for the class that wants to pass on subscriber data, can't access the listeners in the unityevent. and if I don't use the unityevent, I have issues with serializable data in the inspector. And if I don't have serializable data in the inspector, then I have to create coded objects with plenty of hand-coding instead of using the inspector.
I know there are issues with speed, security and error rate, but I'll have to have close encounters with it to be bothered by them and understand them, anyway, so I just want to know how to get to a point where I can pass functions to events effectively while using the inspector.
Eg. I have a cutscene I want to trigger after a dialogue sequence, so I'll trigger it one the dialoguebox closing event, but neither should have event subscription code in them to make it work. Instead I use an EventManager class with an dictionary to subscribe to, and a SubscribeToEvent Class that can accept functions from other objects and subscribe them via inspector.
Your answer
Follow this Question
Related Questions
How do you fill an EventTrigger from a script? 0 Answers
Questions about the event system in unity. 1 Answer
UnityEngine.EventSystems.. Trying to figure it out .js 1 Answer
IPointer Events don't seem to be working 3 Answers
Generic Unity Event triggered from Runtime with listener added in Custom Unity Editor 0 Answers