public void UpdateUI() { if (_characterUI) { _characterUI.SetUnit(this); } }
public void AssignUI(CharacterUI charUI) { charUI.transform.SetParent(transform); charUI.transform.localPosition = new Vector3(0f, 0f, _spriteRenderer.transform.position.z); charUI.SetUnit(this); _characterUI = charUI; //Debug.Log("assigning " + charUI + " to " + this.UnitName); }