# "FMOD Studio Event Emitter" component isn't working with Mouse Down/Up?

**URL:** <https://qa.fmod.com/t/fmod-studio-event-emitter-component-isnt-working-with-mouse-down-up/19882>\
**Category:** Unity\
**Created:** [February 17, 2023, 10:36am UTC](https://qa.fmod.com/t/fmod-studio-event-emitter-component-isnt-working-with-mouse-down-up/19882 "2023-02-17T10:36:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![torley-gallium](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/torley-gallium/32/3688_2.png) [@torley-gallium](https://qa.fmod.com/u/torley-gallium)\
**Post date:** [February 17, 2023, 10:36am UTC](https://qa.fmod.com/t/fmod-studio-event-emitter-component-isnt-working-with-mouse-down-up/19882/1 "2023-02-17T10:36:07Z")

</div>

I have an odd issue, I must be missing something obvious but not sure what. I’m hoping someone spots my oversight.

This is in Unity 2019.4.32f1 LTS with FMOD Studio 2.02.07 and the corresponding Unity integration.

- In Unity, I create a UI \> Button in a scene.
- I add the “FMOD Studio Event Emitter” component to it.
- I assign an event.
- I set the Play Event = Mouse Down or Up.
- I play the scene and click the button.
- OBSERVED: I don’t hear any sound.

Now, if I stop the scene and change Play Event = Object Start and set the sound to an obnoxious loop, I definitely hear it when the scene plays. There’s a listener in there. Other scripted sounds using FMOD play.

I recall this working for me once, am I missing something else I need to do?

---

<div class="post-metadata">

**Author:** ![Leah\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/leah_fmod/32/3685_2.png) [@Leah\_FMOD](https://qa.fmod.com/u/Leah_FMOD)\
**Post date:** [February 19, 2023, 10:46pm UTC](https://qa.fmod.com/t/fmod-studio-event-emitter-component-isnt-working-with-mouse-down-up/19882/2 "2023-02-19T22:46:00Z")

</div>

Hi,

The Mouse Play/Stop Event triggers all rely on MonoBehaviour’s Mouse-related methods, in this case [`MonoBehaviour.OnMouseDown()`](https://docs.unity3d.com/2019.4/Documentation/ScriptReference/MonoBehaviour.OnMouseDown.html). These methods, and by extension the StudioEventEmitter trigger conditions, require a Collider to be on the same GameObject in order to function. I believe `OnMouseDown()` used to be compatible with `GUIElement` before Unity 2019.3, but Unity has since moved to `EventSystems` interfaces for handling UI callbacks - the relevant one in this case being [`EventSystems.IPointerDownHandler`](https://docs.unity3d.com/2019.1/Documentation/ScriptReference/EventSystems.IPointerDownHandler.html).

The StudioEventEmitter doesn’t currently implement the interface, so you won’t be able to handle this case using solely the Play/Stop Event trigger functionality. Instead, you’ll have to implement the interface in your own script, and handle StudioEventEmitter functionality from there. That said, I’ve added UI trigger Play/Stop Event triggers to our internal feature/improvement tracker.

---

<div class="post-metadata">

**Author:** ![torley-gallium](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/torley-gallium/32/3688_2.png) [@torley-gallium](https://qa.fmod.com/u/torley-gallium)\
**Post date:** [February 21, 2023, 7:40pm UTC](https://qa.fmod.com/t/fmod-studio-event-emitter-component-isnt-working-with-mouse-down-up/19882/3 "2023-02-21T19:40:08Z")

</div>

@Leah_FMOD Thank you for the clarification. So does this mean that my expected behavior does NOT work on newer Unity versions, even 2021 LTS?

And that if I’m understanding you correctly, StudioEventEmitter Mouse Down/Up trigger conditions — and which others? — need to be upgraded by your team?

I have a script in progress that uses a method related to what you mentioned, to play FMOD events when I do Mouse Up/Down clicks. Although I’ve got it working, seems like the documentation should call out this important distinction? [https://www.fmod.com/docs/2.02/unity/game-components.html#trigger-conditions](https://www.fmod.com/docs/2.02/unity/game-components.html#trigger-conditions)

I’m actually kind of surprised I didn’t find more matches for it, given that this seems to be the first thing to go to with Unity-FMOD integration, before scripting.

---

<div class="post-metadata">

**Author:** ![Leah\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/leah_fmod/32/3685_2.png) [@Leah\_FMOD](https://qa.fmod.com/u/Leah_FMOD)\
**Post date:** [February 21, 2023, 10:40pm UTC](https://qa.fmod.com/t/fmod-studio-event-emitter-component-isnt-working-with-mouse-down-up/19882/4 "2023-02-21T22:40:19Z")

</div>

> [@torley-gallium](#):
>
> So does this mean that my expected behavior does NOT work on newer Unity versions, even 2021 LTS?

As far as I’m aware, your expected behavior will not work on any newer Unity versions, including 2021 LTS.

> [@torley-gallium](#):
>
> And that if I’m understanding you correctly, StudioEventEmitter Mouse Down/Up trigger conditions — and which others? — need to be upgraded by your team?

It should just be the Mouse Down/Up and Enter/Exit trigger conditions; all other trigger conditions rely on Unity functionality that is still present.

> [@torley-gallium](#):
>
> I have a script in progress that uses a method related to what you mentioned, to play FMOD events when I do Mouse Up/Down clicks. Although I’ve got it working, seems like the documentation should call out this important distinction?

Thanks for pointing that out, I’ve flagged some documentation changes internally.

---

<div class="post-metadata">

**Author:** ![torley-gallium](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/torley-gallium/32/3688_2.png) [@torley-gallium](https://qa.fmod.com/u/torley-gallium)\
**Post date:** [February 21, 2023, 10:56pm UTC](https://qa.fmod.com/t/fmod-studio-event-emitter-component-isnt-working-with-mouse-down-up/19882/5 "2023-02-21T22:56:48Z")

</div>

Thanks again @Leah_FMOD I hope your answers will help someone else out if they come a-lookin’!
