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
- [Android] Light2D with Light type "Spot" does not work in the Player on some Pixel devices
- [Android] Loading the asset using an old reference returns null even when the "FormerlySerializedAs" attribute is used
- Crash on ParticleSystemTrailGeometryJob::RenderJobCommon when changing trail Mode change with a large particle count
- Mouse cursor does not revert to the default mouse cursor when pressing the "Add column" button in the Search window
- ArgumentException is thrown and textures become unreadable when AssetBundle.Unload(false) is called
Resolution Note (2020.2.X):
This will require some significant architectural changes which we are looking to address in the 2021 time frame.