Hi,
To be able to round the values in unity csharp you need the code below:
In order to increase decimals, just use 1000 or 10000 etc.
To be able to round the values in unity csharp you need the code below:
float rawValue = 5.521f;
rawValue = Mathf.Round(rawvalue * 100f) / 100f);
//it should return 5.5
In order to increase decimals, just use 1000 or 10000 etc.