When ‘set value’ is called directly, the ‘On value changed’ event is notified.
Whereas in 5.2, it is only notified when the mouse drags the slider. And other UI controls like ‘checkbox control’ will not be notified when the value is set directly in 5.3.
So, why make this change only for Slider?
So, in 5.3, how to change the value of the slider only without notifying the event?
To clarify: the delegate fires only when the value actually changes. Afair, it’s the same for the checkbox → were you to flip its state, it will fire. Set it twice to unticked, though, and the 2nd notify will not trigger.
So, in 5.3, how to change the value of the slider only without notifying the event?
thanks,
That’s the only way to fix it for now, this change makes it much more complicated by adding many more gates.
As an example, I need to smoothly set the Slider value, 'On value change ’ doesn’t know what triggers the Slider ValueChange (mouse drag or direct Setvalue trigger), so it can’t be implemented.
The same thing happens with the Radial Slider, where the On value change event is not notified when set value is called. There isn’t a unified standard to make these changes oh
Anyway, I don’t think this change makes a lot of sense. And it is annoying to go and fix these little bugs every time you upgrade the engine.
Scroll down to UI Systems to see what’s coming - chances are we’re getting more elaborate stuff to play with and, hopefully, some bug fixes (and/or more bugs, too, surely).
I generally work with wrapped user widgets and add custom event dispatchers, thus always need to include a boolean dictating whether delegates should fire. If one does not, you end up with an infinite loop where the delegate fuels itself…
oh no, this was a bug in 5.2? and I was wondering, why the sliders won’t work anymore -.-
There should be an event “OnValueChangedByDragging” or just a function SetValueWithoutNotify like they have in Unity. Strange, that this doesn’t exist. Seems like a common use case. Especially in Multiplayer.