Forum rules - please read before posting.

OptionsData audio sliders are not registering until I go into the options menu manually

Hey there, I have an SFX that I've added the Sound class to and set it to match the "speech" options slider. The hookup seems to work fine, but there's an issue on start, where the audioSource volume is set to full blast (1.0f I believe) which is not the default value set in the OptionsData. But once I go into the options menu and click on the slider it updates correctly.

Attached is a video demonstrating the issue in a build. But it also occurs in editor in playmode. I've also attached a couple of screenshots to help out. Maybe I shouldn't be using the "Sound" class this way, or there's some step I am missing.

Any help would be greatly appreciated.
Video Link
https://imgur.com/a/aVoksL1
https://imgur.com/a/iokuQPD

Comments

  • edited September 2022

    Welcome to the community, @ZedPoirier.

    You'll need to call the Sound component's SetMaxVolume function from a custom script in order to have it apply the OptionsData's SFX volume to it's AudioSource.

    This is done automatically, however, if you use any of the component's Play functions to have it play audio.

    You bring up a good point, however! I shall look to see if this function can be called internally after the scene-initialisation process, thanks for the details.

  • Wow @ChrisIceBox thanks for the super fast response!

    And it worked flawlessly. I really appreciate this. Thank youuuuuu!

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.