private void UpdateUI() { if (BuildingNameUI != null) { BuildingNameUI.text = SelectedBuildingBlueprint.BuildingPrefab.Name; } if (BuildingNameCost != null) { BuildingNameCost.text = Beautify.GetAmountWithCurrency(SelectedBuildingBlueprint.BuildingPrefab.Cost); } }
// Start is called before the first frame update void Start() { if (BuildingPrefab != null) { if (BuildingName != null) { BuildingName.text = BuildingPrefab.Name; } if (Image != null) { Image.sprite = BuildingPrefab.Image; } if (BuildingDescription != null) { BuildingDescription.text = BuildingPrefab.Description; } if (BuildingCost != null) { BuildingCost.text = Beautify.GetAmountWithCurrency(BuildingPrefab.Cost); } } }