Converting float to int in GuiText (javaScript)

Hello guys,

I’m having some trouble with my float variables in GUITexts, these variables are all float, however, i want to show them in GUIText as Int variables. Is there any way to do such thing?

Thanks in advance.

I’ve found the solution in js, it’s actually pretty simple …

var aFloat = 5.0;

var anInt : int = aFloat;

anInt = Mathf.FloorToInt(aFloat);

((int)yourFloat).ToString();