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
- SystemInfo.get_graphicsDeviceName() is generating garbage GC Alloc when using Metal graphics API
- Crash on D3D12CommonShader::ApplyGpuProgram when attaching material which samples "_UnityFBInput0" to "Full Screen Pass Renderer Feature" Component
- SpeedTree meshes and objects count differs when comparing the numbers in the Player with the Editor
- Model and Prefab Preview icons are not updated after upgrading associated Materials to URP
- Game view is rendered white when viewing the Editor with HDR display and Post Proccesing is enabled on the Main Camera with 2D URP
Resolution Note:
Fixed in 2021.2.0a15