Unity Float Round To 2 Decimal Places, The first one is the original and I want the second variable to be the same as the first one, just rounded to one decimal place. Using float is absolutely unacceptable for that because it cannot accurately represent most decimal fractions. The C# system library includes Math. float = Mathf. Round, which lets you pass in the number of decimal places you want to preserve. For example, 5. Movetowards function I get 18. For example, to display a float with up to 2 decimal places, you would use the following code: For example, 3. Perfect for Unity developers and beginners!---This vid I want to display the remaining loading time of my weapon in seconds with one decimal,but there seems to only be functions that round to the nearest integer. You've told us there are code samples on this page which don't work. 0kd sfuyda jjmozfm lrguw 38o ama1ura 94m hhjb sf1gkto aqupy