I dont want Decimals :P

This is easy I guess… every time the character ends a level, a GUI text displays the exp earned for ex “+100!”.

this is the exp earned variable:

expEarned = Health / GameObject.Find("Time").GetComponent<TimeCounter>().time * (level * _level.GetComponent<LevelStats>().levelDifficulty) * 10;

All the exp related vars are floats, so sometimes, the GUI text displays for example “+123.0567!”

so…what I want to do is to round the exp earned so it doesent display any decimals.

I’m Using “C#”


Check out FloorToInt, i Think it’s what you’re looking for!

or roundtoint