Search Issue Tracker

Fixed in 2019.1.X

Fixed in 2018.3.X

Votes

68

Found in

2017.1.0f3

Issue ID

930798

Regression

No

[Windows] Editor uses OS locale settings (i.e. commas instead of dots in float inspector fields) with Experimental .NET 4.6

Themes

-

Setting the Project to use the new Experimental .NET 4.6 support apparently results in the Editor using the OS's Locale for formatting. In case of a non-English Locale this results in a mixed English/non-English Editor experience, specifically noticeable when commas are used for decimal separation.

Steps to reproduce:
1. [Change Locale setting to non-English]
a) Open Start menu and type Region
b) In an opened window select Formats tab
c) Select any non-English format, that uses commas instead of dots for decimal separation (for example, German (Germany))
d) Apply, close the window
2. Open attached project "Locale bug.zip"
3. Open scene "test" and select "RandomObject" from Hierarchy
4. Take a look at Component "Number Test"

Expected behavior: for float number "Random float" dots are used for decimal separation.
Actual behavior: for float number "Random float" commas are used for decimal separation.

Reproduced with: 2017.2.0b2, 2017.1.0f3.
Not reproduced with: 5.6 (no Experimental .NET 4.6 feature).

Comments (31)

  1. smoketh

    Jul 12, 2019 17:22

    Actually nevermind, i take it back. There was a custom element code i specifically forgotten about...

  2. smoketh

    Jul 12, 2019 17:17

    Broken in 2019.1 for IMGUI specifically

  3. Berno

    Jun 02, 2019 05:51

    Still broken in 2018.4.0f1 windows standalone runtime.
    My app has an editor and Input Fields with decimal places are broken using float.parse in Germany and most likely other locales that use comma instead of decimal.
    Will this be back ported from 2019?

  4. Menion-Leah

    Apr 14, 2019 13:50

    Unity 2018.3.12f1: it's still there and it makes impossibile to build for Android specifying a non-integer "Up to:" value for max aspect ratio

  5. Hullabu

    Mar 20, 2019 14:55

    Why the hell this is still not fixed in the Unity 2018.3?

  6. ditzel

    Feb 16, 2019 07:04

    Still there in 2018.3.0f2

  7. JDMulti

    Jan 21, 2019 16:28

    Also found in 2018.2.20f1 and 2018.3.0f1
    In case you have troubles with parsing floats with commas, a work around is forcing your float into 'Invariant' which is English formatting (dot):
    float number = float.Parse("5,0", CultureInfo.InvariantCulture.NumberFormat);

  8. harunuysali

    Dec 10, 2018 11:27

    Still not fixed on 2018.3.0b12 in location Turkey shows Comma
    And it's become big mess.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.