Search Issue Tracker
Fixed in 4.3.X
Votes
0
Found in
4.2.1f4
Issue ID
564628
Regression
No
Public field surrounded with #ifdef UNITY_EDITOR causes app to crash
Steps to reproduce:
1. Create a new project
2. Add a new script which has a public field surrounded with a "#if UNITY_EDITOR" pre-processor check
3. Place it on the Main Camera in the scene
4. Build and run the project with the current scene
5. See this error in player log:
"A script behaviour has a different serialization layout when loading. (Read 24 bytes but expected 28 bytes)
Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?"
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Editor crashes on StoredGraphicsBuffer::GetGfxBufferID when VFX Graph property is modified during Play Mode and Application.targetFrameRate is used to limit FPS
- Crash on NVAPI_Thunk when changing Player resolution while HDR display is used and Direct3D12 is set as the graphics API
- Only one out of multiple cameras is shown in the Play Mode while HDR display is used and Direct3D12 is set as the graphics API
- The "Paste Component as New" option is incorrectly displayed as active despite the action being prohibited
- "TLS Allocator ALLOC_TEMP_TLS" errors are thrown when unsuccessfully importing an FBX file
Add comment