• Hi Guest!

    We have posted a new VaM2 dev log on Patreon, starting a monthly cadence of written progress updates between Beta releases. Highlights include the new Gizmos System, Selection Carousel, and Modes System with Context-Specific Editing. Beta1.2 is 15 of 21 items complete.

    Read the full post on Patreon, or follow progress on the public Trello roadmap.
Listener Killer

Plugins + Scripts Listener Killer

Download [<1 MB]

Arachnut

Active member
Joined
Nov 4, 2025
Messages
41
Reactions
98
Arachnut submitted a new resource:

Listener Killer - Disable the AudioListeners baked in to certain CUAs!

Stop CUA cameras from stealing your scene's audio perspective!
A lightweight, surgical plugin that solves a common but frustrating issue: Custom Unity assets (CUAs) with camera components often include AudioListener components that hijack your entire scene's audio, making you "hear" from the wrong location.
Wow! What a fun, niche plugin that only 3 people will ever need! 😅

The Problem It Solves​

Have you ever noticed:
  • Music...

Read more about this resource...
 
I was always wondering why the sound would get like that sometimes. Read your description, went "yes of course!". Thank you. :D

Two issues I noticed:
1. I don't think it restores correctly when saving & loading a scene (the listener stays active). Might be related to 'disable all' not working properly?
2. I think something with the audio needs to be reset for this to work correctly in certain scenarious. I've had the situation where audio would stop working completely when disabling the CUA listener. Workaround for me was to then enable & disable the AudioListener on the WindowCamera. I'm in VR, maybe that makes a difference?

Also do you think it would be feasible to allow this plugin to function as a scene/session plugin? As in: just gather all AudioListeners in the scene and disable all except for the VaM one. I really don't see where I would ever need a different AudioListener. Not as critical though, I reckon there might be some work involved with e.g. atom spawning and so on, properly restoring functionality etc...

In any case, thanks for making this!
 
I was always wondering why the sound would get like that sometimes. Read your description, went "yes of course!". Thank you. :D
Fun mystery, wasn't it? 😵‍💫😮‍💨🫣

1. I don't think it restores correctly when saving & loading a scene (the listener stays active). Might be related to 'disable all' not working properly?
Possible! Saving and Restoring data has been a tougher thing for me-- I'll look in to it!

2. I think something with the audio needs to be reset for this to work correctly in certain scenarious. I've had the situation where audio would stop working completely when disabling the CUA listener. Workaround for me was to then enable & disable the AudioListener on the WindowCamera. I'm in VR, maybe that makes a difference?
Interesting. Do you have a video of this perchance? And to be honest, I've done my fair share of programming in many languages-- but the interactions and handshakes between VaM and Unity is something I am newer to. So I'll dig as deep as I can, but this sounds like something out of my wheelhouse.

Also do you think it would be feasible to allow this plugin to function as a scene/session plugin? As in: just gather all AudioListeners in the scene and disable all except for the VaM one. I really don't see where I would ever need a different AudioListener. Not as critical though, I reckon there might be some work involved with e.g. atom spawning and so on, properly restoring functionality etc...
I can certainly try that!

In any case, thanks for making this!
In every case, you are welcome! Thanks for the feedback mate!😻
 
Possible! Saving and Restoring data has been a tougher thing for me-- I'll look in to it!
Same for me when I was messing around with it tbh ^^

And to be honest, I've done my fair share of programming in many languages-- but the interactions and handshakes between VaM and Unity is something I am newer to. So I'll dig as deep as I can, but this sounds like something out of my wheelhouse.
So I took a small gander and this is what happens when you toggle the AudioListener on the WindowCamera:
C#:
if (audioListener != null && SuperController.singleton != null)
{
    if (useAudioListener && cameraOn)
    {
        SuperController.singleton.PushAudioListener(audioListener);
    }
    else
    {
        SuperController.singleton.RemoveAudioListener(audioListener);
    }
}
which in turn does this
C#:
public void PushAudioListener(AudioListener audioListener)
{
    if (!additionalAudioListeners.Contains(audioListener))
    {
        additionalAudioListeners.AddLast(audioListener);
        overrideAudioListener = additionalAudioListeners.Last.Value;
        SyncAudioListener();
    }
}

public void RemoveAudioListener(AudioListener audioListener)
{
    if (additionalAudioListeners.Contains(audioListener))
    {
        additionalAudioListeners.Remove(audioListener);
        audioListener.enabled = false;
        if (additionalAudioListeners.Count > 0)
        {
            overrideAudioListener = additionalAudioListeners.Last.Value;
        }
        else
        {
            overrideAudioListener = null;
        }
        SyncAudioListener();
    }
}

(and then SyncAudioListener() does the whole legwork like handling VR listeners and so on).

So I guess calling RemoveAudioListener() might already do the trick.
 
Same for me when I was messing around with it tbh ^^

So I took a small gander and this is what happens when you toggle the AudioListener on the WindowCamera:
Appreciate the investigative work! 🕵️‍♂️🕵️‍♀️ I think I've already got a substantial update that I'll roll out within the next few days if I can!

Cheers, mate! Watch this space 😁
 
Back
Top Bottom