Image.set_fillAmount有GC

2018-04-18  本文已影响25人  CalmStubborn

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;
    }
}

}

上一篇 下一篇

猜你喜欢

热点阅读