Search Issue Tracker
Fixed in 1.0.0-preview.18
Votes
3
Found in [Package]
1.0.0-preview.16
Issue ID
1359259
Regression
No
[UI Toolkit][IL2CPP] UI is not visible when in built Player and serialization errors are thrown
How to reproduce:
1. Open the attached project's Scene labeled "SampleScene"
2. Make a WebGL build or a windows IL2CPP build
3. Host the built Player
4. Open the WebGL Player in a browser
5. Inspect the canvas
Expected result: UI elements are drawn to the canvas
Actual result: UI is not rendered and multiple errors are thrown:
"A scripted object (probably UnityEngine.UIElements.ThemeStyleSheet?) has a different serialization layout when loading. (Read 56 bytes but expected 136 bytes)
Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?"
Reproducible with: 1.0.0-preview.16 (2020.3.17f1, 2021.1.18f1), 2021.2.0b9, 2022.1.0a6
Couldn't test with: 2019.4.29f1 (UI Toolkit is not available)
Note:
- Used the UXML file from 2021.2.0b7 on affected versions
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
- Tile Palette selected dropdown text does not update when palette is renamed
- ArgumentException thrown and reference to Template gets unset when opening UXML file after editing referenced Template in Play mode
- [iOS][WebGL] Player freezes when multiple properties of a VisualElement are changed at the same time
- Warning 'GetControlID at event ValidateCommand returns a controlID different from the one in the Layout event' is logged when undoing the deletion of an Edited Freeform 2D Light
- ShadowCaster2D breaks on certain Rotation positions when Casting Source is set to PolygonCollider2D
Resolution Note (fix version 1.0.0-preview.18):
Fixed in 2022.2.0a4