Search Issue Tracker
By Design
Votes
1
Found in
2019.4
2019.4.16f1
2020.2
2021.1
2021.2
Issue ID
1315284
Regression
No
MonoBehaviours defined in a manually loaded assembly do not deserialize all fields properly
Reproduction steps:
1. Open attached project "Field Serialization Bug.zip" and scene "SampleScene"
2. In Build Settings, build 'SampleScene'
3. In Editor Menu, click on Test -> Build Asset Bundle, choose the same folder as the Build
4. In Editor Menu, click on Test -> Build DLL, choose the same folder as the Build
5. Open the Build
6. Observe Player.log for the Build
Expected result: 'value1' / 'value2', 'integer1' / 'integer2', 'list1' / 'list2' value pairs are the same
Actual result: 'value1' / 'value2', 'integer1' / 'integer2', 'list1' / 'list2' value pairs are different
Reproducible with: 2019.4.21f1, 2020.2.6f1, 2021.1.0b9, 2021.2.0a7
Could not test with: 2018.4.32f1 (build errors)
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
- Collapsing an empty VFX Subgraph Operator with contextual menu removes the arrow
- TMP_FontAsset fails to change when the Fallback Font Asset is changed
- Property values are not restored for all objects when re-enabled after reset
- "Sub Mesh Mask" field in VFX Graph has no padding
- Source Generation with GeneratePropertyBag fails when using reserved keywords as variable names with @ prefix
Resolution Note:
Unfortunately, there is not much we can do about this: automatic serialization can only happen for objects whose types are available in the domain at serialization/deserialization time.
Things that get loaded dynamically should handle their persistence manually