Search Unity

UI elements with materials disappearing

Discussion in 'UGUI & TextMesh Pro' started by Superjayjay, Mar 30, 2021.

  1. Superjayjay

    Superjayjay

    Joined:
    Mar 28, 2013
    Posts:
    69
    So out of the blue (as in, without doing anything that at first glance could have caused this) I've been running into this bizarre issue where random elements just go missing when I build a windows executable, or run the game in the editor and go through the loading scene. When ran in isolation though, the scene where those elements are missing everything looks fine.

    Also for some reason, maximizing or resizing the play window on the editor fixes the issue from what I've seen. Obviously none of this is of any use to us since we need a working standalone build.

    All the missing UI elements have one thing in common, they all have a material assigned to them. However not all elements with materials are missing. More bizarrely, some TextMeshPro objects show, while other don't. No particular difference between them that I've noticed to explain this.

    No Unity or TMP upgrades changed anything. Tried several solutions I've found online including assigning different materials to both the missing UI elements and TMP elements and absolutely nothing worked.

    To compound the frustration of wasting several days on this, this also happened at a really, really critical time and I'm at a loss on where to look next. I'm honestly losing my mind at this point.
    Any other ideas or even a pointer would be greatly, greatly appreciated.

    I'm running Unity 2018.4.6 and TMPro 1.5.3. Updating to Unity 2020.2 made no difference and neither did deleting the Library folder.

    Edit: Also forgot to mention, but no warnings or errors either, and all the missing UI elements are on a Canvas in overlay render mode.
     
    Last edited: Mar 30, 2021