Search Issue Tracker
Fixed in 1.0.0-preview.8
Votes
1
Found in [Package]
1.0.0-preview.3
Issue ID
1263454
Regression
No
[UI Toolkit] UXML Inlined Styles aren't applied in a build when UXML file is saved
How to reproduce:
1. Open the attached project (case-1263454.zip)
2. Open the UI Builder window (Window -> UI Toolkit -> UI Builder)
3. In the UI Builder Hierarchy of test.uxml expand the 'VisualElement' Container and select one of the 'Label' Controls
4. Make any Inlined Styles changes (for example, change the color of the Text)
5. Save the test.uxml file
6. Build and Run the project
Expected result: the Inlined Styles are applied both in the Editor Game View and in the built Player
Actual result: the Inlined Styles are not applied to the built Player
Reproducible with: 1.0.0-preview.3 (2020.1.0f1), 1.0.0-preview.6 (2020.2.0a19)
Could not test with: 2018.4.26f1, 2019.4.6f1 (package not compatible)
Workarounds:
1. Exit and reopen the project after making changes to the UXML file
2. Open the test.uxml in the code editor and make any changes (adding a meaningless whitespace symbol is enough) and save the file
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
- DownloadHandlerScript.CompleteContent is called twice when building for WebGL
- Scene view has Y coordinates of the Screen Position node flipped when some of the URP features are disabled
- Volumetric fog shader variants are missing from build when "Strict Shader Variant Matching" is disabled
- Unnecessary modifications clutter the Scene when using a RectTransform driven by a LayoutGroup in a Prefab
- Files in the target folder are deleted without a proper warning when building an iOS project
Resolution Note (fix version 1.0.0-preview.8):
Note that the whitespace in inline styles had nothing to do with the root issue, which was that the UI Builder was incorrectly overriding the inline StyleSheet asset inside a VisualTreeAsset (UXML) when saving it. This was fixed.