public static class ImageUtil {
public static void SetFillAmount(Image img, float value)
{
if (img == null)
{
return;
}
value = Mathf.Clamp01(value);
if (Mathf.Abs(img.fillAmount-value) > Mathf.Epsilon)
{
img.fillAmount = value;
}
}
}