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
-
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
- 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 (2020.2.X):
This will require some significant architectural changes which we are looking to address in the 2021 time frame.