Unable to set the value of any volume slider widget type.

I’m attempting to create a volume control slider for my game’s UI. My goal is to let players set the volume from mute to twice as loud as default.

However, I’ve found that none of the audio-related sliders have any means of setting the default value via blueprint. As an example, here is a screenshot of what UAudioRadialSlider outputs if you try to search “set value”:


When the player opens the settings UI, I want to set the current value to whatever they have set, but strangely enough, I can’t seem to find how.

Am I missing something, or are you just not supposed to be able to do this?

Kind regards,

Hey @User-400315961!

Don’t worry, it’s just that widgets are a little different style of blueprint- the UMG. What you want to do is bind the value on the DESIGNER tab. Whatever you put there is how you “Set” the value of the slider like you would a variable in normal Blueprints! :slight_smile:

image

Give that a shot and let us know how it goes!

1 Like

Hello @Mind-Brain, thank you for the reply!

I went ahead and give binding a try. Both with a variable, and later with a function, as you showed:

First I tried to directly bind it to a variable:
image

I then made a simple custom event to set that variable to 0 - 200:

Which was triggered by a button in my UI:

Unfortunately, it did not seem to work, the value was updated, but visually, nothing changed:


It’s a bit hard to see, apologies, I didn’t think at the time of rearranging the UI to make the knob bigger, but I can say that at no moment did the value change from -160.

Next, I tried a function as you had shown in your comment.
First, I tried this:
image

Unfortunately, it had the same result:

I also tried giving it an input rather than an output, but that returned an error and I had to give up.

I’m not sure if I’m missing something (maybe some function to force a UI element refresh?).
I have little experience with UI, so I apologize if I missed anything obvious.

Someone came up with another method here, maybe give this a shot?

Gave it a try just now, it unfortunately did not work.

I think at this point I’m going to cut my losses and move towards a different set-up, a text field for numbers where you can input a percentage you want for volume. Not as visually appealing, but it’ll get the job done.

Regardless, thank you Mind-Brain, although I wasn’t able to get it working, getting replies at all, particularly from respected members of the community, is a wonderful thing that prevents one from feeling discouraged when they encounter a problem. Too many times have I had a problem on the Unity forums just to find out I was shouting into the void, so thank you for your replies.

1 Like