Search Issue Tracker
Won't Fix
Votes
0
Found in
2019.4.22f1
2020.3.3f1
2021.1.0b7
2021.2.0a4
Issue ID
1327513
Regression
Yes
JSON deserialization produces different results when comparing to other conversion methods
Reproduction steps:
1. Open attached project "JsonUtilityCorruption.zip"
2. In Test Runner window, run tests for "ReproduceCorruptionTest"
3. Observe the tests
Expected result: The tests pass
Actual result: The tests fail with "Expected: <WWTK.Stickers.StickerInstanceManagerState> But was: <WWTK.Stickers.StickerInstanceManagerState>" error
Reproducible with: 2019.4.22f1, 2019.4.24f1, 2020.3.3f1, 2020.3.4f1, 2021.1.0b7, 2021.1.1f1, 2021.2.0a4, 2021.2.0a12
Not reproducible with: 2019.4.21f1, 2020.3.2f1, 2021.1.0b6, 2021.2.0a3
Could not test with: 2018.4.30f1 (console errors break project)
Notes:
Also reproduced on macOS
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:
The order that OnAfterDeserialization will be called on nested objects is not guaranteed, so an object should not assume that OnAfterDeserialization has already been called on a different object when doing its own initialization. A recent fix guarantees that SerializeReference fields will be fully initialized by the time OnAfterDeserialization is called. And it is also guaranteed that OnAfterDeserialization on the outer object would be called last. It is our recommended to trigger any initialization code that needs to span across nested objects to be triggered from the main object's OnAfterDeserialization callback, that is a safe way to avoid fragile dependencies on the order of callback execution.