Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on Dec 8, 2022, between 7 am & 7 pm EST, in the DOTS Dev Blitz Day 2022 - Q&A forum, Discord, and Unity3D Subreddit to learn more about DOTS directly from the Unity Developers.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

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?