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
- Mono Windows Builds don't produce full log callstacks when generating logs
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
This is a duplicate of issue #1232785