Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

Slider horizontal fill bar never disappears completely

Discussion in 'UGUI & TextMesh Pro' started by iivo_k, Aug 25, 2014.

  1. iivo_k

    iivo_k

    Joined:
    Jan 28, 2013
    Posts:
    314
    I'm trying to use a slider without handle as a non-interactable progress bar, controlled by a script.
    When the slider is horizontal (LeftToRight or RightToLeft), the fill bar never disappears at min value (possibly due to the expected handle position?). When vertical, it works as expected.

    Here's a picture:


    Is this something that could be expected to be changed, or should I just use a custom progress bar?

    I created a bug report too.
     
    Last edited: Aug 25, 2014
  2. iivo_k

    iivo_k

    Joined:
    Jan 28, 2013
    Posts:
    314
    Ah, it was the W Delta value in the Fill component. Not a bug then.
     
    Tim-C likes this.
  3. Claytonious

    Claytonious

    Joined:
    Feb 16, 2009
    Posts:
    907
    What was the "W Delta value" that you refer to? I'm having the same issue. Thanks!
     
  4. iivo_k

    iivo_k

    Joined:
    Jan 28, 2013
    Posts:
    314
    Under the Slider GameObject there's a "Fill Area" and under that "Fill". Change the "W Delta" or "Width" value of the Fill transform to 0.
     
  5. Brandgage-1

    Brandgage-1

    Joined:
    Nov 15, 2017
    Posts:
    32
    necroing old thread!

    Currenty experiencing the issue where the fill area is not depleting completely when you hide the scrubber.
    The mentioned solution works but this is because you are literally setting the width/height to 0 and just hiding the fill area.

    There is another issue where the fill area is being stretched, but due to nature of my assets they need to be masked instead of resized. You can see it in the first image where the fill area is a square, or so it seems. In the second image is the fill area at full (it even overshoots the background). It looks as expected though because the fill area is no longer "squeezed" tight.

    Capture.PNG Capture2.PNG


     
    wingsneon likes this.
  6. TealComet

    TealComet

    Joined:
    Jan 29, 2023
    Posts:
    3
    About original issue : click on the Fill parent, and set its Left and Right properties to 0. Do the same with the Fill child, and you're all set.