UMG Slider - OnValueChanged is not called when I manually SetValue

Hi,

In a settings menu, I’m trying to get my Xbox controller to affect a slider which changes the volume of the game. So far, the mouse works, because when I drag the slider, the event OnValueChanged (VolumeSlider) fires, allowing me to set the volume.

However, I want my controller to modify the slider as well, so when controller input right fires, I increment the slider with SetValue. However, this doesn’t call the OnValueChanged (VolumeSlider) event. Is this a bug?

Thanks,
Stu

It looks like a bug.

I just came into the same issue and it’s really annoying that I have to modify engine code just for a signal to fire. If you don’t want to modify the engine you will have to subclass USlider and SSlider because you cannot directly call CommitValue on SSlider since it’s protected, and you cannot broadcast the multicast since it’s private!, then you also have to make sure to override RebuildWidget on USlider to rebuild your own version of SSlider.

Epic should make CommitValue public or broadcast the signal on SetValue.

Edit: I found a better solution, just subclass USlider and declare an event/multicast and directly broadcast it on a custom set value function, then listen on that event instead the one from USlider.

I am experiencing this too. It seems the OnValueChanged event only fires when the slider widget itself is manipulated, not when the value changes in code/BP. I would expect “OnValueChanged()” to either be fired whenever the slider value is changed (even by code) or to be named something else.

Public CommitValue would be so convenient, so awesome…