Search Unity

Resolved On/Off Audio Mixer Group using Toggle Button

Discussion in 'Audio & Video' started by IvanParkhomenko, Sep 5, 2022.

  1. IvanParkhomenko

    IvanParkhomenko

    Joined:
    Apr 25, 2022
    Posts:
    2
    Try to mute the audio mixer group using the Toggle element and the AudioMixerGroupController.mute method. When Toggle is clicked, the Mute button in the audio mixer turns on and off (turns green). But the sound can be heard in any state of the button. If this button is turned on and off manually, it works fine. I have been able to find almost nothing on the internet on this method. Can someone help with this issue?

    PS Solution through the script is known and there are no questions about it.
     

    Attached Files:

    udemyrootgames, Anym00se and gr00ber like this.
  2. IvanParkhomenko

    IvanParkhomenko

    Joined:
    Apr 25, 2022
    Posts:
    2
    Found a solution. Just changing the value is not enough, you must also execute the method after changing AudioMixerGroupController.UpdateMuteSolo.
     
  3. gr00ber

    gr00ber

    Joined:
    Jul 5, 2013
    Posts:
    2
    Really this should be so damn simple it escapes me what the thinking is behind the design - but it looks like 'programmer think' rather than 'user behavior' focused SDK.

    AudioMixerGroupController.Mute() - mute the mixer as a whole
    AudioMixerGroupController.UnMute()

    AudioMixerGroupController.Mute(Bus) - mute one bus
    AudioMixerGroupController.UnMute(Bus)
    AudioMixerGroupController.Solo(Bus) - solo one bus
    AudioMixerGroupController.UnSolo(Bus)

    Straight forwards, easy to read - simple to implement .. and actually matches up with how mixing desks really work and what any audio implementer, or programmer can understand!

    There has been SO much confusion over Mixer functionality - people needing to add variables, setting volumes directly, forum posts, youtube videos. A result of engineers doing - but not thinking about the end user. You know your engine well, so you know how to make it work, what you are really trying to do is think how to make it work for everyone else thast isn't you.

    Further more - this has been going on for over a decade! That is poor design highlighted.
     
    c-Row and Snowirbis like this.