Search Unity

Bug UI elements flickering to wrong images on windows builds

Discussion in 'UGUI & TextMesh Pro' started by yaxamie, Mar 16, 2022.

  1. yaxamie

    yaxamie

    Joined:
    Mar 11, 2017
    Posts:
    8
    We're on 2019.4.15f1 and we're seeing some UI "flickering" on Windows (but not Mac) builds and not ever in Unity Editor.

    It seems possibly related to this issue: https://forum.unity.com/threads/5-3-elements-in-the-ui-flicker-between-different-sprites.373098/

    It seems like it is frame rate related, as running multiple clients does seem to encourage it.

    upload_2022-3-15_20-30-53.png

    Here's a frame where many of the image are wrong (tho this would be likely for a single frame).

    upload_2022-3-15_20-31-58.png

    Note that the UI would normally look like the above (for reference().

    I can provide feedback but the flicker would occur for instance when rapidly causing mouseovers by rolling over images.

    We've only been able to make this particular issue go away by having the CLI argument added:

    -force-gfx-direct

    Things which have not worked:

    Adding this code:

    QualitySettings.maxQueuedFrames = 1;


    Targeting exclusively OpenGLCore, DXD11, DXD12 (all have the same issue) in player settings. Note: DXD11, the default, if anything seems much better than OpenGLCore, which seems to have a lot of rendering artifacts for our game.

    Definitely seems to be an issue with multithreaded rendering in other words, probably using the wrong atlas when 2 frames try to render at the same time?

    I haven't found a "simple" option to fix the issue... it seems like Unity bases multithreaded Rendering on a series of settings and there's no simple way to turn it off apart from asking players to go into steam and adding Command-line args.

    It seems like optimizing performance will mitigate the issue somewhat by keeping the frame rate high, but I'm curious.

    I have video of the issue as well but wanted to kind of type up things textually, hopefully, to help whoever else is searching for this issue.

    Thanks in Adavance!
     

    Attached Files:

  2. yaxamie

    yaxamie

    Joined:
    Mar 11, 2017
    Posts:
    8
  3. yaxamie

    yaxamie

    Joined:
    Mar 11, 2017
    Posts:
    8
    Ended up switching all of our UI canvases over to ScreenSpace - Overlay. Fixed the issue. No idea why that matters but it does.