slider value unity returns to 1 code example Example: how to set value of slider in unity slider.value = newValue