I can not get the On Value Changed function on a slider to pass its changed value to a function. It will only ever send the value that is displayed in the input field. The manual says that it is supposed to send its changed value as an argument to the function but it is not doing that for me.
Currently, the slider has a min value of 0, max value of 10, and a default value of 0.
Screenshot of the settings
The function that is being called is just this:
public void MainVolumeControl(float vol){
Debug.Log ( "vol is: " + vol );
}
The manual states that the On Value Changed “… event can send the current value as a float type dynamic argument. The value is passed as a float type regardless of whether the Whole Numbers property is enabled.”
That is just not happening. It will only ever pass what is in the last input field on the Event section - 0 in the screen-shot. If I put “3” than 3 will be the only thing passed to the function no matter what the sliders value is.
So, what am I doing wrong or is the manual wrong?