Address a specific Event Emitter

Hey,

I’m trying to mostly work with “FMOD Studio Event Emitters”, as it is more clear to me. Sometimes I need to address an emitter from another object and use this to do so:

public FMODUnity.StudioEventEmitter emitter;

Unfortunately, when an object holds multiple emitter, all of them get addressed with this method, as I can only select the object holding the emitter, not the emitter itself. Is there a way to address a specific emitter?

The easiest way is to not have multiple FMOD Studio Event Emitters on a single gameObject, and to instead add them on child objects like so:

If for some reason you can’t have the FMOD Studio Event Emitters on child gameObjects, you can do the following to create references to inidividual references FMOD Studio Event Emitters:

  1. Click on the 3 dots in the inspector and click through to Add Tab>Inspector
  2. Drag out the new Inspector tab so you can see both windows at the same time
  3. Select the gameObject with your script and click the lock icon in the Inspector to lock this selection in place
  4. Select your gameObject with multiple FMOD Studio Event Emitters on it, displaying it in the second Inspector window
  5. Drag the individual FMOD Studio Event Emitters onto the slots in your script. They will all have the same name displayed, but they will be references to the individual instances.

Hopefully that answers your question. Please let me know if anything is unclear.

Thank you very much for your effort to explain this. Working with child objects seems to be the easiest way and works fine for me.

1 Like