Search Issue Tracker
Fixed
Votes
0
Found in
2020.2
2020.2.1f1
2021.1
2021.2
Issue ID
1312500
Regression
No
USS file parsing stops when it encounters an unknown CSS parameter
Reproduction steps:
1. Open attached project "1312500.zip"
2. Open "TestStyleSheet.uss" from the Assets folder in any code editor (e.g. Visual Studio)
3. Notice how the 7th line has the "color" parameter set to red and is centered in middle with other properties
4. Open "TestWindow.uxml" from the Assets folder (UI Builder package is required to view this window)
5. Notice how all style parameters set in "TestStyleSheet.uss" work
6. Open "TestStyleSheet.uss" again and add an additional parameter "font-weight: bold;" right above "color" parameter
7. Save the file and look at "TestWindow.xuml" again
Expected result: Font weight is not set, because it's not used in Unity UI Toolkit, but the color is still set to red
Actual result: Font weight is not set as expected, but color also doesn't get set because USS parsing stops
Reproducible with: 1.0.0-preview.11 (2020.2.6f1, 2021.1.0b8, 2021.2.0a6), 1.0.0-preview.13 (2020.2.1f1, 2020.2.6f1, 2021.1.0b8, 2021.2.0a6), 1.0.0-preview.14 (2020.2.6f1, 2021.1.0b8, 2021.2.0a6)
Couldn't test with: 2018.4, 2019.4 (UI Toolkit is not available)
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
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
Resolution Note:
Fixed in 2021.2.0a15