private void UpdateStatUI(Stats.EventArgs args) { Stats stats = this.GetStatsTarget(); if (!stats) { return; } string statID = this.stat.stat.uniqueName; if (this.icon) { this.icon.overrideSprite = stats.GetStatIcon(statID); } if (this.color) { this.color.color = stats.GetStatColor(statID); } if (this.title) { this.title.text = stats.GetStatTitle(statID); } if (this.description) { this.description.text = stats.GetStatDescription(statID); } if (this.shortName) { this.shortName.text = stats.GetStatShortName(statID); } if (this.value) { this.value.text = stats.GetStat(statID, null).ToString(); } if (this.imageFill) { this.imageFill.fillAmount = stats.GetStat(statID, null); } }