Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Timeline window has white background when running on .NET 4.6

Discussion in 'Experimental Scripting Previews' started by Xtro, Aug 2, 2017.

  1. Xtro

    Xtro

    Joined:
    Apr 17, 2013
    Posts:
    604
    Timeline window has white background when running on .NET 4.6
     

    Attached Files:

  2. Xarbrough

    Xarbrough

    Joined:
    Dec 11, 2014
    Posts:
    1,188
    For me, too. And I thought, I screwed up the editor skin somehow. xD
     
  3. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,921
    @Xtro: Can you submit a bug report so we can track this? Thanks!
     
  4. Xtro

    Xtro

    Joined:
    Apr 17, 2013
    Posts:
    604
  5. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,921
  6. Tomas-Kiniulis

    Tomas-Kiniulis

    Unity Technologies

    Joined:
    Apr 27, 2017
    Posts:
    55
    What is your system primary language set to? Oddly enough, as Xtro mentioned in his report, this reproduces only with .Net 4.6 and only when the system language is set to Turkish. Seems to work fine with other languages I've tested.
     
  7. Xarbrough

    Xarbrough

    Joined:
    Dec 11, 2014
    Posts:
    1,188
    I've been using 4.6 (on 3.5 it doesn't reproduce) and my display language is English, but Culture Format and Keyboard are set to German. This means my OS displays text in English, but Unity started (not sure, maybe since 2017?) using the comma-separator in input fields.
     
  8. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,921
    The new scripting runtime change the way locale settings are working by default. There is another thread about this: https://forum.unity3d.com/threads/editor-is-using-windows-locale-settings.442847

    We're currently investigating the best way to handle this.
     
  9. Xtro

    Xtro

    Joined:
    Apr 17, 2013
    Posts:
    604
    I tested this on 2017.3b1 and still broken. Any update?
     
  10. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,921
    It looks like the bug report is still open with the timeline team. I'm not sure about the cause, but it seems to be related to locale settings, based on the investigation our QA team did. So the problem does not happen with English US locale, but it does occur with some others.
     
  11. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,294
    Using Window's locale is still a bad idea!

    Please, please, please, if you insist on grabbing the user's locale, let us at least force the locale to be English US somewhere so we don't have to deal with random things breaking due to locale differences. There is really only downsides to it being something else than US.

    It's not like locale settings is in any way a localization feature. It's just a feature that changes code results arbitrarily from computer to computer. I'll bet you that this has to do with some color not parsing due to being spelled with , instead of . or something similarly silly.
     
  12. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    487
    Default culture should not be US, it should be invariant culture.
     
  13. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,294
    Probably true! That's what the invariant culture is for, after all. My bad.
     
  14. Xtro

    Xtro

    Joined:
    Apr 17, 2013
    Posts:
    604
    I can't believe this is still not fixed. Such an easy fix. Anyway. I got rid of all my Unity culture specific problems with this script. It must be placer in an "Editor" folder.

    Code (CSharp):
    1. using System.Globalization;
    2. using System.Threading;
    3. using UnityEditor;
    4.  
    5. [InitializeOnLoad]
    6. static class UnityCultureFix
    7. {
    8.     static UnityCultureFix()
    9.     {
    10.         var Culture = new CultureInfo("en-US");
    11.         Thread.CurrentThread.CurrentCulture = Culture;
    12.         Thread.CurrentThread.CurrentUICulture = Culture;
    13.     }
    14. }
    15.  
     
    MiFrilke and Baste like this.