? hi how are you
You can simply cast the float to int (and use the int in your string):
float f = 2.3f;
int i = (int)f; //The value will be 2, as the decimal part is truncated
myTextObj.text = "Your number is " + i;
? hi how are you
You can simply cast the float to int (and use the int in your string):
float f = 2.3f;
int i = (int)f; //The value will be 2, as the decimal part is truncated
myTextObj.text = "Your number is " + i;