Inspector Event Map

How could I implement an Inspector Event Mapper like this?
-It has a list of events on the left side
-For each event, it triggers a list of methods from other components from a dropdown.

I’ve tried using Unity Events, but I’m a bit clueless

5945723--636635--upload_2020-6-5_20-5-32.png

We did this with ScriptableObjects and we called them AudioEvents… they basically have a handful of settings in them:

  • a list of AudioClips, including volume level
  • AudioSource it should play from
  • does it loop
  • random strategy (shuffle, random, play all clips at once, etc.)
  • pitch range
  • should it “chain onto” another AudioEvent (just a reference) when it’s done
  • etc.

Then we just play them by the name of the ScriptableObject.

We also used a grouping system called AudioEventSet which kept bunches of these events together, such as “always loaded” and “level 1” and “level 2” etc.

1 Like

That sounds good. Didnt thought about putting it on SOs

It worked out pretty nice. We added a custom inspector on it so that there was an “play” button in the actual ScriptableObject inspector window, and it would trigger the behavior (to the extent possible) in editor.

I also got tired of making them every time the audio guy dropped a whole bunch of new WAV files in so I made a menu item that would iterate all audio files in a directory and produce an AudioEvent associated with it, with default values set up, like pointing to the clip, etc. HUGE time saver.