using UnityEngine;
using System.Collections;
public class ResetSliderOnRelease : MonoBehaviour
{
public UISlider theSlider;
float fMiddle = 0.5F;
void OnPress (bool isPressed)
{
float theTime = Time.time;
print ("got message, isPressed is: " + isPressed + " at " + theTime);
if (theSlider != null && isPressed == false)
{
theSlider.sliderValue = fMiddle;
theSlider.ForceUpdate ();
}
}
}