UGUI Image血条或者进度条效果

把图片的Image组件中的image type选成Filled,下面就出现了Fill Amount,通过GetComponent<Image>().fillAmount; 就可以拿到float类型的fillAmount。

 

原文地址:https://www.cnblogs.com/Peng18233754457/p/7860535.html