# No sound from Event Emitter, aside when object created - EventRef; OneShotSound; Fmod 2.02.07; Unity 2021.3

**URL:** <https://qa.fmod.com/t/no-sound-from-event-emitter-aside-when-object-created-eventref-oneshotsound-fmod-2-02-07-unity-2021-3/19386>\
**Category:** FMOD Studio\
**Tags:** unity\
**Created:** [October 11, 2022, 5:20pm UTC](https://qa.fmod.com/t/no-sound-from-event-emitter-aside-when-object-created-eventref-oneshotsound-fmod-2-02-07-unity-2021-3/19386 "2022-10-11T17:20:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AmbientArtstyles](https://avatars.discourse-cdn.com/v4/letter/a/87869e/32.png) [@AmbientArtstyles](https://qa.fmod.com/u/AmbientArtstyles)\
**Post date:** [October 11, 2022, 5:20pm UTC](https://qa.fmod.com/t/no-sound-from-event-emitter-aside-when-object-created-eventref-oneshotsound-fmod-2-02-07-unity-2021-3/19386/1 "2022-10-11T17:20:05Z")

</div>

Hi all, I am very new to Fmod and coming from a healthy Wwise background.

I am running into an issue in Unity where I cannot get UI sounds to play via ‘FMOD Studio Event Emitters’, nor by writing a script to play a sound when an event is referenced.

**Description**  
None of the Events from the Event Emitter trigger the sound aside from Object Start (pic below). I can play audio triggered by Object Start but nothing else. Soundbanks are loaded.

I have searched through forum posts and tutorials but I am completely lost. I feel like I am missing something really simple. I have found a lot of resources which resolve my problems using the deprecated EventRef function…

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/0/08f38039dcb11368b74dffcce1f4ee9abed3357e.jpeg)

Resources that I have found but which were not helpful. (edit can only attach two, being a new user)

- [Tutorial from 2021 which uses deprecated EventRef](https://youtu.be/9RLz79LZP2k?t=222)  
This script would solve my issue but it uses an outdated function.

- [2022 tutorial How To Use EventReferences & PlayOneShotAttached();](https://www.youtube.com/watch?v=t7X7eVu4cA4)  
This goes into editing the RuntimeManger…not quite what I need.

---

<div class="post-metadata">

**Author:** ![Connor\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/connor_fmod/32/3685_2.png) [@Connor\_FMOD](https://qa.fmod.com/u/Connor_FMOD)\
**Post date:** [October 13, 2022, 10:34pm UTC](https://qa.fmod.com/t/no-sound-from-event-emitter-aside-when-object-created-eventref-oneshotsound-fmod-2-02-07-unity-2021-3/19386/2 "2022-10-13T22:34:56Z")

</div>

Hi,

`Mouse Enter` is intended to work on GUI elements explained in the Unity Docs here: [Unity - Scripting API: GUI](https://docs.unity3d.com/ScriptReference/GUI.html)

To have a UI Button make a sound when the mouse highlights it you could do something like this:

```auto
using UnityEngine; 
using UnityEngine.EventSystems; 

public class MouseOver : MonoBehaviour, IPointerEnterHandler
{
    public FMODUnity.EventReference hoverSound;

	public void OnPointerEnter(PointerEventData eventData)
	{
		FMODUnity.RuntimeManager.PlayOneShot(hoverSound, this.transform.position);
	}
}

```

This will play a OneShot whenever the mouse hovers over the button. Important bits are `using UnityEngine.EventSystems` and `IPointerEnterHandler`.

I’ll make a note to add in the docs this is a bit confusing.
