Answers for "Add float value to ui text in unity"

C#
0

Add float value to ui text in unity

//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
Posted by: Guest on August-27-2020

C# Answers by Framework

Browse Popular Code Answers by Language