private void UpdateValueGrid() { float val = ValueF2; var frameIndex = GetFrameIndex(val); barImage.uvTiling = GetTilling(); barImage.uvOffset = GetOffset(frameIndex); barImage.sprite = gridSprite.sprite; barImage.color = gridSprite.color; barImage.material = gridSprite.material; barImage.SetAllDirty(); }
private void UpdateValue() { if (imageBar == null) { return; } imageBar.fillValue = ValueF2; imageBar.SetAllDirty(); if (effectTilledImageBarMask != null) { effectTilledImageBarMask.fillValue = ValueF2; effectTilledImageBarMask.SetAllDirty(); } }
private void UpdateValue() { if (imageBar == null) { return; } if (!Mathf.Approximately(imageBar.fillValue, ValueF2)) { imageBar.fillValue = ValueF2; imageBar.SetAllDirty(); if (effectTilledImageBarMask != null) { effectTilledImageBarMask.fillValue = ValueF2; effectTilledImageBarMask.SetAllDirty(); } } }