Unity3d Ugui Slider (slider)

Source: Internet
Author: User

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.