Post

Some advice for devs, if you're ever parsing strings into floats for whatever reason, make sure you take into account that some languages in the world swap the roles of the comma and the decimal. It'll read it without error, but suddenly 2.5 becomes 2,500 for some users, causing problems. #gamedev

This is especially true for Unity devs, as C#'s "float.parse" will default to the operating system's language's handling for parsing. You have to specify culture settings to make sure it remains consistent. I learned this the hard way 😀

2 reposts24 likes

Certainly! Though the issue I discovered was more the inverse. However, I've been sure to use String.Format for implementation of localizing strings. Though now with this in mind I'll be double checking every implementation of conversion with strings.