Search Issue Tracker
Postponed means that the issue was either a feature request or something that requires major refactoring on our side. Since that makes the issue not actionable in the close future we choose to close it as Postponed and add it on our internal roadmaps and technical debt pages instead.
Postponed
Votes
1
Found in
2019.4
2019.4.1f1
2020.2
Issue ID
1260686
Regression
No
Editor only classes break serialization when using SerializeReference attribute
How to reproduce:
1. Open user's attached "SerializeReference Bug.zip" project
2. Open "Bug" Scene
3. Go to File -> Build And Run
4. Observe the player
Expected result: No error messages are thrown
Actual result: "A scripted object (probably Bug?) has a different serialization layout when loading" error message is thrown
Reproducible with: 2019.4.3f1, 2020.1.0b15, 2020.2.0a18
Could not test with: 2018.4.24f1 (SerializeReference attribute not supported)
Notes:
- The issue is not reproducible in the Unity Editor
- Removing #if UNITY_EDITOR from the class removes the issue
- The issue is reproducible on both Windows and Mac player
Comments (1)
-
WilliamBenichou
Mar 18, 2021 11:48
Still present in 2019.4.12f1, removing #if UNITY_EDITOR on already corrupted ScriptableObjects doesn't seem to fix them...
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
- Invalid Clip Method
- WebGPU error with Fantasy Kingdom and GPU Resident Drawer
- WebGPU fails with height fog in Fantasy Kingdom
- Crash on UndoManager::RegisterUndoInternal when applying added GameObjects to a Prefab
- [Asset Bundles] A new bundle hash is not generated when the name of a serialized field is changed
Resolution Note (2020.2.X):
This will require some significant architectural changes which we are looking to address in the 2021 time frame.