Check out example codes for "Add float value to ui text in unity". It will help you in understanding the concepts better.

Code Example 1

//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

Learn ReactJs, React Native from akashmittal.com