Search Issue Tracker
Duplicate
Votes
0
Found in
2019.3.12f1
2019.4
2020.1
2020.2
Issue ID
1250707
Regression
No
A misleading error is thrown when Managed Code Stripping strips a part of serialized code
How to reproduce:
1. Open the attached "1250707 repro" project
2. Open the Build Settings from File > Build Settings
3. Make sure that Development Build is set to true
4. Build and Run the project
Expected result: an error is thrown stating that "AlwaysCondition" class from "Conditions.cs" was stripped due to managed code stripping
Actual result: an error is thrown suggesting that #ifdef UNITY_EDITOR has been used in a section of serialized code
Reproducible with: 2019.4.2f1, 2020.1.0b14, 2020.0.a16
Could not test with: 2018.4.23f1 ([SerializeReferece] doesn't exist)
Notes:
- The issue reproduces with Mono and IL2CPP Scripting Backends
- The issue on this specific project reproduces with Medium and High Managed Stripping Levels
- #ifdef UNITY_EDITOR isn't used in any of the Scripts making the error even more confusing
- The full error states: A scripted object (probably QuestSettings?) has a different serialization layout when loading. (Read 116 bytes but expected 164 bytes)
Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?
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
- Editor default Stylesheet/Matching Selector buttons in Debugger don't do anything
- Graphics.DrawMeshNow stops rendering Render Texture after a few frames when viewed in the Player
- New selector in Matching Selectors displays as on line -1 in debugger
- The first frames are skipped when playing a video
- Text auto-scrolling can not work when naming assets/objects until backspace key is pressed
This is a duplicate of issue #1232785