- Home /
Generic Unity Event triggered from Runtime with listener added in Custom Unity Editor
So this is probably a very unique problem that usually wouldn't need solving.
Backstory:
For my final year University project I am trying to make a unity extension (just an editor window at the moment) that can 'balance' a generic racing game. I have a RaceManager as a gameobject and a WinRateEditor as my 'external' framework editor window. The user can set the number of game runs it wants the game to go through for each balance iteration.
Problem: I'm trying to use an event for on gameobject to be triggered and the editor window to have a listener added. The issue is I need the listener in the editor window to be as generic as possible, no hardcoded FindProperty tags as this extension ideally can be used across many games. I haven't found a way of assigning the event through the editor window and telling it what it needs to add the listener for.
I appreciate this is awfully worded and is a very unique problem but any help would be very welcomed
Made this diagram to try and explain what Im trying to do; I have the dropdown working and its accessible as a serialized property but I cant seen to find a way for the edtiro window to see when the event has been triggered.