Dssdiego
4/23/2020 - 11:26 PM

Image Fill Setter

Unity Image Fill Setter

public class ImageFillSetter : MonoBehaviour {
  public FloatReference Variable;
  public FloatReference Max;
  
  public Image image;
  
  private void Update() {
    Image.fillAmount = Mathf.Clamp(Variable.Value / Max.Value);
  }
}