So after googling I couldn’t find out why my UI stopped showing. One to another day it just stopped working. My co workers all still see the UI and it works. But in my game it just will not show!
I tried deleting the packages and resetting all settings to no avail. Does anyone have an idea to debug this? When I change the clear color settings to black I get a completely black screen. Thank you in advance.
Hello, can you confirm if you’re using UI Toolkit for your UI? There are 2 UI systems (UI Toolkit and UGUI) and the answers will be different for each one.
Are you using the Canvas component? Or do you have UXML/USS files and a PanelSettings?
Do you see anything at all? What about if you open the UI Toolkit Debugger, do you see anything on the hierarchy for your game’s UI?
There was an issue with loading the Default Theme Style Sheet but that was fixed with preview.18, though if you can try right clicking on the asset and selecting “Reimport” that could help.
So I tried the UI Debugger and I noticed all elements are there but are invisible, even when hovering (won’t show on a screenshot) the element is in the proper location:
The height of the element you highlighted on your screenshot is zero, that’s why they’re not showing. Without looking at the UXML and code it’ll be hard to tell what’s wrong though.
I see that you got it fixed, and that’s great, but to answer your question the UIDocument itself does not do anything regarding USS files. You have to set your styles on your UXML, or you can set StyleSheets by code, of course. Also, the PanelSettings has a Theme Style Sheet set, you can see it in its inspector. The Theme Style Sheet holds the basic styling for font, colors, button appearance, etc.