I am keeping track of time using a float in my game and I then show it in the corner of the screen. I don’t want it to go out the full, however many, digits behind the decimal point. I just want it to go back two numbers after the decimal point. So how would I do that? Thank you!
If it’s just for changing to string:
If you want the float itself truncated:
yourFloat = Mathf.Round(yourFloat * 100f) / 100f;