Quantcast
Channel: Latest Questions by Grievemourne
Viewing all articles
Browse latest Browse all 51

What's the best compromise for inspector-using event system?

$
0
0
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.

Viewing all articles
Browse latest Browse all 51

Trending Articles