Search Issue Tracker
Fixed in 2021.2.X
Votes
1
Found in
Issue ID
1320914
Regression
No
Loading invalid UXML or USS returns non null object
Loading UXML or USS files with errors returns non-null object. The import shows errors but you can still do
var mysheet = AssetDatabase.LoadAssetAtPath<StyleSheet>("MyBad.uss");
and I get a non null (mysheet != null) StyleSheet object with empty data.
MyBad.uss:
Label {
font-size: 20px;
-unity-font-style: bold;
color: rgb(68, 138, 255); dsdd >
Note: Instantiating the returned VisualTreeAsset
will return a null VisualElement though
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
- Crash on PrepareDrawShadowsCommandStep1 when entering the Play Mode in a specific project
- Physics Layer Collision Matrix's Layer names, checkboxes and hover highlights become misaligned when the Editor's UI Scaling gets changed
- Light/shadow information on an edge of a Terrain tile creates a seam with an adjacent Terrain tile when baking a LightMap
- "Missing types referenced from component UniversalRenderPipelineGlobalSettings on game object UniversalRenderPipelineGlobalSettings..." warning is thrown after switching the Platform to tvOS
- “Metal: Error creating pipeline state (Universal Render Pipeline/2D/Sprite-Lit-Default): Vertex attribute BLENDINDICES0(5) of type uint4 cannot be read using MTLAttributeFormatFloat2 (null)“ when setting GPU Skinning to GPU after opening the project
mattone593
Mar 12, 2021 01:54
LOADING INVALID UXML OR USS RETURNS NON NULL OBJECT
UI Toolkit-Mar 11, 2021
Loading UXML or USS files with errors returns non-null object. The import shows errors but you can still do
var mysheet = AssetDatabase.LoadAssetAtPath<StyleSheet>("MyBad.uss");
and I get a non null (mysheet != null) StyleSheet object with empty data.
MyBad.uss:
Label {
font-size: 20px;
-unity-font-style: bold;
color: rgb(68, 138, 255); dsdd >