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

Scripting

-

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)

  1. 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

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.