Search Issue Tracker
Fixed
Fixed in 2021.3.16f1, 2022.2.2f1, 2023.1.0a22
Votes
0
Found in
2021.3.6f1
2022.1.10f1
2022.2.0b3
2023.1.0a4
Issue ID
UUM-11196
Regression
No
UI Builder leaks "DefaultCommonDark_inter.uss" stylesheet into UI Documents
How to reproduce:
# Open the attached project (IN-5049.zip)
# Make sure “SampleScene” is open from the “Assets/Scenes” directory
# Observe the Game view and the text present in the UI panel on the left
# In the Project panel go to “Assets/GUI/Theme“ and open the ”base-theme” in a text editor
# Comment out lines 5 and 6 (starting with “{{-unity-font}}“ and “{{-unity-font-definition}}“ respectively)
# Return to the Editor and observe the Game view
Expected result: all text is rendered as it was before
Actual result: all the UI text is invisible
Reproducible with: 2021.3.6f1, 2022.1.10f1, 2022.2.0b3, 2023.1.0a4
Could not test with: 2020.3.37f1 (UI documents could not be loaded)
Reproducible on: MacOS 12.4, Ubuntu 20.04, Windows 10
Notes:
# Related forum thread: [https://forum.unity.com/threads/unity-ui-styles-leak-into-ui-builder.1285865/|https://forum.unity.com/threads/unity-ui-styles-leak-into-ui-builder.1285865/]
# The UI Builder interface leaks the “DefaultCommonDark_inter.uss” stylesheet into the user's UI Document making the representation in the UI Builder different from that of the Game view. The Editor font is leaked onto all elements when they won’t possess the fonts inherently and thus all text isn’t rendered in Game view.
# The issue appears to not be present when using a theme that inherits the “default.uss” stylesheet, however when you don’t, like in the attached project the issue becomes apparent.
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- The Scrollbar becomes unusable when adding Elements to the List
- "One or more data file missing for baking set NewScene Baking Set. Cannot load shared data." error in Player when a specific project is built
- Choosing new HDR Colour using RGB values breaks colour on Intensity Selectors
- Rendering/Decal Layer Mask options are different inside Prefab Mode and outside Prefab Mode when the project is upgraded to Unity 6
- Incorrect Realtime GI Light Probes baking when more than one Light Probe Group is used and "Baked Global Illumination" is enabled
Resolution Note (fix version 2022.2.2f1):
Fixed the old theme not being removed from the list of documentElement's stylesheet when changing the current theme.
Resolution Note (fix version 2021.3.16f1):
Ensure the old theme is removed from the list of stylesheets applied to the canvas when changing the current theme.