Here's how to use the Ugui slider bar (slider)
There are three game objects under the control
Background-The background
Fill area--foreground region
Handle Slide Area--Sliding bar
Properties of the slider
Several other settings are similar to other controls, and there are several unique properties to be explained here.
Direction-Directional
Whole Numbers---control integer input
Then look at the script control. Here's the method call and the other no, the method has floating-point parameters
usingUnityengine;usingSystem.Collections; Public classSildertest:monobehaviour {//Use this for initialization voidStart () {}//Update is called once per frame voidUpdate () {} Public voidSlidertest (floateven) {Debug.logerror ("your amount of blood ="+even); }}
Then, by binding the script, the method can be called when changing the value of the slider bar.
Unity3d Ugui Slider (slider)