Introduction
Did you know you can trigger sound effects on mouse hover in Unity—without writing a single line of code? By leveraging built-in UI components like Event Triggers and Audio Sources, you can easily add interactive feedback to buttons and other UI elements directly in the Editor.
For a visual breakdown of this subject, you may find my video discussion helpful.
What do we need to play sounds on mouse hover in Unity
We basically need three elements in order to play sounds on mouse hover over UI elements, we need a way to play the sound, we need the sound clip to be played and we need a way to detect the mouse hover event over UI elements. Let’s analyze these three elements:
Create at least one AudioSource object in the scene to play the sound
You can create easily a new AudioSource object simply by right clicking in the Hierarchy window, go to audio and click on “AudioSource”, this will create a GameObject with an AudioSource component assigned to it, this AudioSource has the “Play On Awake” checkbox enabled by default so you have to disable it, otherwise the Audio Clip will be played on Start.
Audio files to play on mouse hover
The file of the sound you want to play on mouse hover over UI elements, I suggest you use files with the WAV or OGG format. You can assign the AudioClip to the “Clip” variable in the AudioSource component.
Event trigger component attached on the UI element
We add an EventTrigger component to our button (See Figure 1) and this allows us to detect different events on this buttons, events like when the mouse cursor hovers over the button, also when a click is made on a button and many other options. In our case we are intereseted in the “Pointer Enter” event which is called when the mouse cursor hovers for the first time a UI element (See Figure 2).


How to PLAY SOUNDS on MOUSE HOVER over UI elements in Unity
Once we cover all the previous three steps needed to play sounds on mouse hover in Unity we need to properly configure them. Here is a step by step guide to do it.
- Select your button, in the inspector click on “Add Component” and look for the “Event Trigger” component.
- Click on “New Event Type” in the Event Trigger and select “Pointer Enter”.
- Create a new AudioSource GameObject (or use an existing one) and drag that GameObject to the “Pointer Enter” event (See Figure 3).
- Using the drop down menu of the “Pointer Enter” event go to the AudioSource section and look for the “PlayOneShot” function (See Figure 4).
- Drag the Audio file with the sound you want to play on mouse hover to the field of the “Play One Shot” function in the “Pointer Enter” event (See Figure 5).
- Play and test



Examples of using hover-triggered sounds in Unity UI
1. Basic Button Feedback
Use Case: Play a subtle “click” or “hover” sound (e.g., a soft beep or swoosh) when the mouse passes over a menu button.
Why? Enhances user experience with tactile feedback.
Implementation:
- Attach an Event Trigger component to the button.
- Add the “Pointer Enter” event → Link to an Audio Source with your sound clip.
2. Game Menu Interactions
Use Case: A “rustling paper” sound when hovering over menu tabs (e.g., in a fantasy RPG).
Why? Reinforces the game’s theme and immersion.
Pro Tip: Use 3D spatial sound if the UI is part of the game world (e.g., a diegetic menu).
3. Accessibility Cues
Use Case: A “ping” sound for visually impaired players to confirm UI selection.
Why? Makes navigation more inclusive.
Optimization: Use a low-latency audio format (e.g., .wav
) to avoid delay.
4. Dynamic UI in Simulations
Use Case: A “mechanical beep” when hovering over interactive cockpit buttons (e.g., flight simulators).
Why? Mimics real-world interfaces for realism.
5. Mobile/Web UI
Use Case: A “vibrato pluck” sound for hoverable icons (even on touch devices via “Pointer Enter”).
Caution: Ensure sounds are short (<500ms) and non-repetitive to avoid annoyance.
Bonus: Use pitch randomization (e.g., audioSource.pitch = Random.Range(0.9f, 1.1f)
) to avoid monotony.