Quantcast
Channel: Unity Forum
Viewing all articles
Browse latest Browse all 1466670

float.ToString() Format

$
0
0
Hi,
Code (CSharp):
  1. float my_float = 1.1234f;
  2. Debug.Log(my_float.ToString("F2"));
I just realize that this command show the float in the device localisation format.
Example :
-Log in UK : "1.12"
-Log in France : "1,12"
The decimal separator is not a "." in every localisation.

Is there a way to always have a "." and never have a ","?

Thanks!

Viewing all articles
Browse latest Browse all 1466670

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>