Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Background-color ignored on a half of testing machines

Discussion in 'UI Toolkit' started by crudeMe, Sep 17, 2021.

  1. crudeMe

    crudeMe

    Joined:
    Jul 8, 2015
    Posts:
    92
    Hi,

    I'm using Unity 2021.2.0b6 with built-in UI Builder. Made a simple ui with a use of UI Builder without Editor Extension. I've extracted inline styles to stylesheet files. Inspector in UI Builder showing no bold lables, meaning there are no inline element style changes.I'm loading USS with something like
    UIDocument.rootVisualElement.styleSheets.Add(Resources.Load<StyleSheets>("MainstyleSheet"))
    . Now, I've built x64 and x32 versions with Mono backend Windows standalone and distributed amongst different testers with different system configuration.

    Roughly half of testers are sending me screenshots with no backgrounds. They have correctly placed elements, which means Visual Tree Asset is working, correct size and color for fonts and absolutely no background on any element - buttons, labels, visual elements or groups. Backgrounds are just transparent. I've collected some player.logs with no particular error or sign of misconfiguration.

    Other half of testers shows perfectly fine UI with all backgrounds in place. Which is what I see on my machine. Meaning I can't reproduce this behaviour to start digging somewhere.

    Where to go now?

    Example from USS
    Code (CSharp):
    1. .topMenu {
    2.     height: 29px;
    3.     background-color: rgb(25, 25, 25);
    4.     border-bottom-color: rgba(79, 79, 79, 0);
    5.     border-bottom-width: 1px;
    6.     flex-direction: row;
    7.     position: relative;
    8.     left: 0;
    9.     right: -9px;
    10. }
     
  2. crudeMe

    crudeMe

    Joined:
    Jul 8, 2015
    Posts:
    92
    Okay, stepping down to latest stable version of Unity seems to fix that.

    *Seems like it was connected to my other issue with beta version with resizing window.
     
  3. antoine-unity

    antoine-unity

    Unity Technologies

    Joined:
    Sep 10, 2015
    Posts:
    683
    Can you confirm moving to the latest 2021.2 beta fixed your issue?
     
  4. crudeMe

    crudeMe

    Joined:
    Jul 8, 2015
    Posts:
    92
    Seems like the reason was
    OnDemandRendering.renderFrameInterval
    . I can't confirm it 100% percent, but the other issue I had with my project settings - camera rect stretching on window maximize - is not reproducing when I'm not manipulating renderFrameInterval. I guess it's sort of "by design".
    thanks