Search Issue Tracker

By Design

Votes

0

Found in

5.5.0f3

Issue ID

858150

Regression

No

AudioMixer.SetFloat() ignores new value when it is changed and saved during previous play scene session

Audio

-

To reproduce:

1. Create new project
2. Download and import AudioMixer error.unitypackage
3. Open 'AudioMixer not working as expected' scene
4. Play scene
5. Click 'Show panel' button in game view
6. Move BGM volume slider to the left side.
7. Notice in console that volume is set to -10 (min value) and music is playing silently
8. Stop and play the scene again.

Expected result: when you play scene the second time, music will play silently, because you set it to the minimal value before.
Actual result: volume slider is set to the minimal value, but music plays as it would be maximum value.

Notice: this problem occurs only in editor. If you build game, volume control works properly.

Reproduced on: 5.5.0a6, b10, f3, 5.6.0a5
Not able to reproduce on 5.3.5f1 and 5.4.3p2 because of 806348 and 632169 cases bugs with AudioMixer.SetFloat()

Comments (4)

  1. huulong

    Jul 21, 2022 19:49

    I sent a feedback on the SetFloat doc page to tell them to add this piece of information.

  2. michaelday008

    Aug 24, 2021 18:56

    This was NOT documented on the SetFloat() page and I was yet another person who fell victim to this inconsistency and wasted hours of my time trying to debug it.

  3. angrypenguin

    Feb 12, 2021 21:06

    As you can see it is not mentioned here: https://docs.unity3d.com/ScriptReference/Audio.AudioMixer.SetFloat.html

    Inconsistencies must be documented! As you can see here people have had time wasted by running into this for years: https://forum.unity.com/threads/audiomixer-setfloat-doesnt-work-on-awake.323880/#post-6832595

    But for what it's worth, I believe the design should be changed to cache and re-apply stuff which has previously been applied.

  4. angrypenguin

    Feb 12, 2021 21:01

    If this is "by design" then it needs to be made clear in all relevant documentation pages. From memory when I ran into this it wasn't, do even if you won't make it work you do need to update the docs.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.