Search Unity

Question How do I programatically change the active AudioMixer?

Discussion in 'Audio & Video' started by zoltanbigitec, Dec 7, 2020.

  1. zoltanbigitec

    zoltanbigitec

    Joined:
    Jan 3, 2020
    Posts:
    7
    As the title says, I'd like to change the active AudioMixer asset runtime. How does one go about that?

    Thank you!
     
  2. zoltanbigitec

    zoltanbigitec

    Joined:
    Jan 3, 2020
    Posts:
    7
    I think I have figured it out. As far as I understand, there's no single "active" audio mixer, but instead AudioMixer instances get created as they get referenced from within a scene. So when I have, let's say, two mixer assets and my AudioSource components in my scene have references to AudioGroups from each one, both of them will be instantiated/active when the scene is loaded.

    Can someone confirm if my reasoning above is right?