Search Unity

Sound volume change on load scene for no reason

Discussion in 'Web' started by Schminitz, May 1, 2016.

  1. Schminitz

    Schminitz

    Joined:
    Nov 15, 2013
    Posts:
    16
    Hello,

    I work on a webgl game, but I have some issue with the volume of my audioclips.

    The first time I load my main gameplay scene, the volume of all the sounds are perfect, but when I reload this scene, some sound become quier. I don't see any reason for that, I do not change the volume of the sounds in the game.

    This issue only happens when the game is built on webgl (here on firefox). When I test directly in the unity editor, or when I build a .exe, there is no problem.

    Is it a bug? Anyone know a way to fix that?
     
  2. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,666
    Please report a bug with a repro case, and post the case number here, then we can have a look.
     
  3. roka

    roka

    Joined:
    Sep 12, 2010
    Posts:
    598
    If you use the "Normalize" settings on your audio file, it will be ignored on the webgl build.
    Got the same yesterday. Normalized sound work in the editor but not in the build.
     
  4. Schminitz

    Schminitz

    Joined:
    Nov 15, 2013
    Posts:
    16
    When you say "normalize" you speak about the effect? I have no effect on my sounds.
    I am not unable to reproduce the bug in a small project to do a repro case, I will check what is the main differences between my little try and my whole project, then I will come back.
     
  5. roka

    roka

    Joined:
    Sep 12, 2010
    Posts:
    598
    "Normalize" in the import sound settings.
    Select your audio file in your project window and check the inspector window
     
  6. Schminitz

    Schminitz

    Joined:
    Nov 15, 2013
    Posts:
    16
    Ho yes, but the normalize option is enabled only on "Force to mono" and I don't do that.
    Anyway I fixed my problem, I do use a DontDestroyOnLoad object to manage the musics, this fixed the problem. I guess it was caused by big MP3 (5Mo +) that was loaded on each scene change.