Search Unity

4.3 Unity Editor region settings and decimal separator

Discussion in 'Editor & General Support' started by Silly_Rollo, Apr 8, 2014.

  1. Silly_Rollo

    Silly_Rollo

    Joined:
    Dec 21, 2012
    Posts:
    501
    I'm having the oddest bug in the Unity editor and I can't track it down. For some reason randomly numeric values in the editor display with a comma as a separator instead of a period so 1.778 becomes 1,778. Even in mecanim floats are then displayed as "0,0" rather than "0.0". It isn't just the display either as it screws up serialization since it reads the value as a comma. It happens randomly in multiple projects which is making it hard to track down. I'll be working and suddenly the decimal separator is a comma when it was period just a few minutes ago. Since it happens randomly I haven't been able tor reproduce it on another machine yet as it may take minutes or hours to happen.

    I have removed all editor scripts from the projects and it doesn't fix the issue. I have checked all my Windows region settings over and over and they never read as anything besides United States with a period for a decimal separator. Nothing else on my machine displays decimals like this just Unity. Restarting Unity often fixes it for a random amount of time.

    Any ideas? Is there a specific region setting somewhere in Unity I'm missing? This has been going on for months but I always assumed it was something in the big project I was working on but in a new project that doesn't share code is doing the same thing.
     
  2. Eitrius

    Eitrius

    Joined:
    Dec 30, 2013
    Posts:
    19
    I'm having this problem as well and cannot figure it out, though it seems to have only popped up in recent weeks. Maybe we have some things in common. Do you have PC or Mac? Pro? What version of Unity? Any editor extension assets?
     
  3. Silly_Rollo

    Silly_Rollo

    Joined:
    Dec 21, 2012
    Posts:
    501
    Someone else with the problem! I'm still having it and I get it even with no editor extensions. I do have Pro and Unity 4.3 and also had it intermittently in 4.2. It's happening on a PC running Windows 8.1 but I can't duplicate it on a Windows 7 PC so it may be related to that though the W7 PC wasn't Pro. I was previously running W8.0 with the issue and upgrading to 8.1 didn't affect it.
     
  4. Marco-Sperling

    Marco-Sperling

    Joined:
    Mar 5, 2012
    Posts:
    620
    Having the same issue here. ShaderForge won't compile shaders with floating point numbers correctly because of this bug.
    I'll keep you informed in case we can track down the source of this.
    Win7, PC, Germany.
     
  5. Silly_Rollo

    Silly_Rollo

    Joined:
    Dec 21, 2012
    Posts:
    501
    Bumping with this with a new observation. NGUI/Daikon displays aren't affected by the decimal separator going wacky but all GUIText also displays the decimals with a comma.
     
  6. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Posts:
    1,624
    i dont know what might cause it (i've seen similar stuff though before from using some dlls that dont quite play nice).
    But you can try to workaround it with
    Code (csharp):
    1. Thread.CurrentThread.CurrentCulture = new CultureInfo("en-us");
    placed somewhere in start method
     
  7. Silly_Rollo

    Silly_Rollo

    Joined:
    Dec 21, 2012
    Posts:
    501
    I threw that in an editor script so I can at least run it when the editor starts bugging out as it does fix it. I get this in a project without any dlls, any ideas on the cause?