Search Issue Tracker
Fixed in 2021.3.16f1
Fixed in 2021.3.X, 2022.2.X, 2023.1.X, 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/
- 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
- Shader warning in 'Hidden/Core/DebugOccluder' thrown after building High Definition 3D Sample Template
- Audio Mixer “+” buttons overlap with UI when the Audio Mixer window layout is set to Horizontal
- "Clear" button in the "Set project display name" closes all the pop-up instead of clearing just a name from the field
- Video Player renders no video on specific devices when using Vulkan
- The Editor slows itself down by showing tons of warnings when the majority of TransformAccessArrays content are NullRefs
Resolution Note (fix version 2022.2):
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):
Ensure the old theme is removed from the list of stylesheets applied to the canvas when changing the current theme.