private void UpdateTooltip() { if (tooltip) { tooltip.SetContent(title, ToString()); } }
public void BuildWithPolicy(PolicyController pc) { if (policy) { Destroy(policy.gameObject); } policy = pc; title.text = pc.title; description.text = pc.effect; tooltip.SetContent(pc.title, pc.description); foodReq.text = pc.resourceRequirements.food.ToString(); energyReq.text = pc.resourceRequirements.energy.ToString(); popReq.text = pc.resourceRequirements.population.ToString(); }