jknightdoeswork / swatchr

A color palette management system for Unity
MIT License
110 stars 15 forks source link

SwatchPresetExporter is depending on the locale #1

Closed Fellhuhn closed 5 years ago

Fellhuhn commented 5 years ago

Depending on the locale the string.Format function in GetYAMLForColor will use a comma as decimal separator and not a dot which will break the importer.

Fix:

return string.Format(System.Globalization.CultureInfo.GetCultureInfo("en"), "\n - m_Name: \n m_Color: {{r: {0}, g: {1}, b: {2}, a: {3}}}", c.r, c.g, c.b, c.a);

And the name is missing from the .colors file. So swatch.name has to be entered into the COLORS_TEMPLATE. And a newline is missing at the end of the file.

jknightdoeswork commented 5 years ago

Awesome. Thanks for the heads up. I'll merge this in tonight.

jknightdoeswork commented 5 years ago

fixed in cbc5cc5.

Thanks for the info.