Thanks I updated to the latest release of
NGUI v2.1.6.
But I do not see the point of using:
Use uiSlider.onValueChange += YourCallback.
Isn't this behaving exactly like my first post ?
// mysliderGO.GetComponent<UISlider>().functionName = "onValueChange";
mysliderGO.GetComponent<UISlider>().eventReceiver=gameObject;
public void onValueChange (float value) {...
Then I see every change of the slider but I only want to track the value change after the user let's go of the UISlider.
Do you understand that I want to see a Slider Value change only after the user
releases the Thumb icon? Let's say that the Thumb is set to 0.1f and the user drags the slider to 1.0f releasing the Thumb marker. I would like to get a slider change reported as 1f. Instead I get every moment the Thumb was dragged from 0.2f, 0.3f, 0.4f, 0.5f, 0.6f, 0.7f, 0.8f, 0.9f, 1f. Which is reporting overkill in my particular case.
I would expect OnPress to support this behavior...float sliderValue = 0.5f;
public void onSliderValueChangeRelease (GameObject sender, bool pressed)
{
if (!pressed) // on finger Released
{
float selection = sender.GetComponent<UISlider>().sliderValue;
sliderValue=(float)System.Math.Round(selection, 2, System.MidpointRounding.AwayFromZero);
print(sender.name+" : "+sliderValue+" "+pressed);
}
}
But it doesn't seem to work.
