# Muting audio when interacting with game object in unity

**URL:** <https://qa.fmod.com/t/muting-audio-when-interacting-with-game-object-in-unity/24253>\
**Category:** Unity\
**Tags:** unity\
**Created:** [May 11, 2026, 10:48pm UTC](https://qa.fmod.com/t/muting-audio-when-interacting-with-game-object-in-unity/24253 "2026-05-11T22:48:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomNTU\_61416](https://avatars.discourse-cdn.com/v4/letter/t/8edcca/32.png) [@tomNTU\_61416](https://qa.fmod.com/u/tomNTU_61416)\
**Post date:** [May 11, 2026, 10:48pm UTC](https://qa.fmod.com/t/muting-audio-when-interacting-with-game-object-in-unity/24253/1 "2026-05-11T22:48:46Z")

</div>

Hey! I’m struggling to figure out how to get this setup to work: I have a radio object which I can interact with in Unity, and I want this interact to toggle between muting and unmuting a continuously playing FMOD event. How would I implement this?

I’m quite new to FMOD Unity by the way

---

<div class="post-metadata">

**Author:** ![li\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/li_fmod/32/6577_2.png) [@li\_fmod](https://qa.fmod.com/u/li_fmod)\
**Post date:** [May 12, 2026, 6:22am UTC](https://qa.fmod.com/t/muting-audio-when-interacting-with-game-object-in-unity/24253/2 "2026-05-12T06:22:36Z")

</div>

Hi,

Thank you for sharing the information.

> [@tomNTU\_61416](#):
>
> I have a radio object which I can interact with in Unity, and I want this interact to toggle between muting and unmuting a continuously playing FMOD event. How would I implement this?

If your radio object is using a `StudioEventEmitter`, a simple way is to toggle the volume of its event instance when the object is interacted with.

For example:

```auto
using UnityEngine;
using FMODUnity;

public class RadioMuteToggle : MonoBehaviour
{
    public StudioEventEmitter radioEmitter;
    private bool muted;

    private void Update()
    {
        // press P to test mute/unmute
        if (Input.GetKeyDown(KeyCode.P))
        {
            Interact();
        }
    }

    public void Interact()
    {
        muted = !muted;
        radioEmitter.EventInstance.setVolume(muted ? 0f : 1f);
    }
}

```

Add this script to your radio object, assign the same `StudioEventEmitter` to `radioEmitter`, then press **P** to test it. In your own project, you can call `Interact()` from your interaction system instead.

This mutes/unmutes the radio while the event keeps playing in the background.

If you want the radio to pause instead, you can use [Studio::EventInstance::setPaused](https://fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_setpaused) instead of [Studio::EventInstance::setVolume](https://fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_setvolume) in `Interact()`.

For example:

```auto
radioEmitter.EventInstance.setPaused(muted);

```

Hope this helps!
