daemon3000 / InputManager

Custom InputManager for Unity
Other
587 stars 88 forks source link

Floats may be parsed and written with different cultures #45

Closed idbrii closed 5 years ago

idbrii commented 5 years ago

Floats like deadzone are parsed with InvariantCulture but written with default culture.

On saving, users on French-language systems will write "0,5" instead of "0.5" (invalid in InvariantCulture) and results in a FormatException from ReadAttributeAsFloat on loading.

I believe using ToString(CultureInfo.InvariantCulture) for each of the floats passed to WriteElementString would resolve the issue.

daemon3000 commented 5 years ago

Should be fixed now. Let me know if it's still an issue.