Ajouter la valeur flottante au texte de l'interface utilisateur dans l'unité

//Attach your Text Object in the Inpsector
public Text goldUi;
float gold = 3;

goldUi.text = "You have" + gold.ToString("00") + "gold";
//This will display: You have 3 gold
Comfortable Capybara