How can I change the slider value from another Widget Blueprints in Unreal Engine 5?

37 Views Asked by At

I have a slider in one Widget Blueprints, and a button in another. When the user clicks on this button, the slider should be placed in the middle (value 0.5).

I only found how to get the slider from another widget, but I don't understand how to change its value.

1

There are 1 best solutions below

0
Petrov Makariy On

You can create a function in your widget that sets the slider value to 0.5. This is a good practice because it ensures that your entity is self-regulating its values and is responsible for its own actions. The function you will need to use in the slider class to achieve this is SetValue()