public void SetUnit(UnitSO unit) { this.unit = unit; skillAnimation.SetUnitId(unit.unitId); damageLog.SetId(unit.unitId); image.sprite = unit.sprite; image.rectTransform.sizeDelta = new Vector2(unit.sprite.rect.width, unit.sprite.rect.height); statusEffects.Init(unit); }
public void SetUnit(UnitSO unit) { this.unit = unit; nameText.text = unit.unitName; levelText.text = "Lvl: " + unit.level; UpdateData(unit); skillAnimation.SetUnitId(unit.unitId); damageLog.SetId(unit.unitId); image.sprite = unit.sprite; image.rectTransform.sizeDelta = new Vector2(unit.sprite.rect.width, unit.sprite.rect.height); statusEffects.Init(unit); }