Since it’s been available I’ve been playing with the new UI in my free time and so far it’ really cool.
The flexibility and ease of use already seem very cool.
I’ve noticed an odd behaviour with the slider in conjunction with the image fill amount.
I was wondering if this is by design or if it’s a bug. I set up a slider so that it controls the fill of an image (you’ll see in the webplayer). When I set the slider range from 0.001 to 1 the slider works as expected: decreasing and increasing the fill amount of the image. When I set the slider to the full range, though the image fill does not increase after it’s reached absolute zero any more.
I am still seeing this issue as well, though it occasionally even happens with values that are not zero. Repeatedly setting the value in an Update() loop in a script eventually gets the value to stick.
I have to wonder, is this related to similar UI variable value bugs? For example the Shadow and Outline effects not having their values stick either? With animating them a user’s suggestion of calling SetAllDirty() works with the shadow and outline, but it hasn’t yet worked for fillAmount.
Here we are in 2019 using unity 2018.3.3f1 and this issue is still an issue.
adding this line image.enabled = image.fillAmount > 0; after the one where you set your image.fillAmount = 0f; in Update() loop fixes the issue.