public void CreateDamageIndicator(float damage, Vector3 hitPoint) { string damageString = "-" + damage.ToString(); DamageIndicator newIndicator = Instantiate(damageIndicator.gameObject, Vector3.zero, Quaternion.identity, playerCanvas.transform).GetComponent <DamageIndicator>(); newIndicator.SetText(damageString); newIndicator.SetHitPoint(hitPoint); }