/// <summary> /// Changes the tooltip info given a certain key /// </summary> /// <param name="key">Key of the unit/building to look up in the database</param> public void ChangeTooltip(string key) { UnitInfo unitInfo = UnitDatabase.GetInfo(key); this.title.text = unitInfo.Name; this.description.text = $"Sand: {unitInfo.SandCost}\nCandy: {unitInfo.CandyCost}\n{unitInfo.Description}"; }