Forum rules - please read before posting.

Managing sounds volume

Hello there !

I'm having troubles while implementing the 'Options' feature in our Titlescreen scene.

I currently have 3 Slider gameobjects, one for Music volume, one for SFX volume and one for Speech volume. Each Slider uses the 'Kickstarter.options.SetVolume()' method to change (and save) the proper sound volume.
The volume is correctly being changed in the settings.

My problem is
 : When I play sound with the actions "Sound : Play" or "Sound : Play Music", the volume value in the settings has no impact, even though I have created Sound gameobjects through AC Game Editor, and correctly set the 'Sound Type'.

Example : If I put the Music volume to 0, I can still hear the music from the Sound gameobjects with Soundtype == Music.

What I noticed : The "Sound : Play One Shot" works fine with the SXF volume setting. So I checked the source and saw that the 'Options.GetMusicVolume()' wasn't used at all in the project (unlike the GetSXFVolume which is used in the PlayOneShot action script).

AC version :  v1.61.2  -  We are currently planning to update to the most recent version next week.

Do you have any idea of what could be wrong ? (in case something is wrong of course)

Thank you !

Comments

  • edited October 2018
    When setting the volume via the slider, are you getting a Console message informing you that the PlayerPrefs key was saved?

    Also, what platform are you working with, and is this a problem with both builds and the Editor?

    The GetMusicVolume method isn't used because the Sound component reads the volume value directly from the OptionsData class.  If you're looking through the source, I'm referring to the SetMaxVolume method in Sound.cs.

    AC v1.62.0 included the following fix:
    • Fixed: Sound volumes not always updating instantly when changed in the Options menu
    Even if it's in a duplicate project, I'd recommend upgrading your AC version as it may now be resolved.
  • The PlayerPrefs are saved every time I move the slider.

    We are currently working on Windows Platform, and we will test the options on our next build session which is on Thursday.

    At the moment I tried to call the 'Kickstarter.stateHandler.UpdateAllMaxVolumes()'  every time the slider is modified, which sets the max volume of every Sound object in the scene, but the sound volume still remains the same.

    Let's hope it is just an update issue !
  • The bugfix only dealt with the volumes of sounds as the options were updated - restarting your project / Unity Editor should cause them all to be correct.

    If you exit/re-enter play mode, are the sound volumes then correct?  If you click "Reset options data" and assign new default values via the bottom of the Settings Manager, are they correct then?
  • The sound volumes aren't correct when I exit/re-enter play mode, and neither when I click "Reset options data" and change the options directly in the settings manager.
  • And in what version of Unity?

    Duplicate your project and import the latest AC release.  If the issue still occurs, strip away all non-essential assets (models, animation etc) so that you have a single scene that demonstrates the issue.  Zip it up and PM it to me, and I'll take a look.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.