Search Issue Tracker

Fixed in 4.6.X

Votes

8

Found in

4.6.0b17

Issue ID

627780

Regression

No

UI Image fill amount breaks when value is set to 0 through script

UI

-

To reproduce:
1. Open attached project
2. Open test scene
3. Select test game object
4. Press play
5. Press Down Arrow till fill amount value is 0
6. Press Up Arrow
7. Notice than Fill amount value changes, but image doesn't appear

Workaround: Drag fill amount slider the image will render again.

Comments (14)

  1. Eric Elzy

    Aug 28, 2014 21:20

    I just noticed this too. Took me a while to finally figure it out.

    @Jschieck That is pretty much what I have done to get it to work for now.

    Hoping this gets fixed for the actual 4.6

  2. jschieck

    Aug 28, 2014 16:11

    disabling and re-enabling the image also is a fix for it. so after setting the fillAmount just use:

    image.enabled = image.fillAmount > 0;

  3. monegames1225

    Aug 24, 2014 20:27

    one way around this is to set a minimum fill amount to a tiny amount such as 0.001f. and set the fill amount to that if it drops to 0 or lower. this will still show up as invisible but allow it to build back up when needed.

  4. Ecke

    Aug 23, 2014 13:20

    I have the same issue in my Project, same Unity Version.
    An Image with Image Type "Filled" and Fill Method "Horizontal". As soon as the Image reaches fillAmout 0 and rise again, the filling is not drawn anymore. (Changing the fillAmout value via script)

Add comment

Log in to post comment