Search Issue Tracker
By Design
By Design in 2023.1.X
Votes
0
Found in
2020.3.40f1
2021.3.11f1
2022.1.17f1
2022.2.0b8
2023.1.0a12
Issue ID
UUM-18938
Regression
Yes
Script can't be instantiated in the Player when the project is built with IL2CPP
How to reproduce:
1. Open the user-attached project “2022.2 Beta Project”
2. Build And Run the project with IL2CPP Scripting Backend
3. Observe the Development Console in the Player
Expected result: There are no errors
Actual result: There is an error logged in the Console
Reproduced with: 2020.3.40f1, 2021.3.1f1, 2021.3.11f1, 2022.1.0b16, 2022.1.17f1, 2022.2.0a11, 2022.2.0b8, 2023.1.0a12
Not reproduced with: 2021.3.0f1, 2022.1.0b15, 2022.2.0a10
Reproduced on: Windows 11 Pro
Note: Not reproduced in Editor
Full error:
The script 'SerializationBug' could not be instantiated!
A scripted object (probably SerializationBug?) has a different serialization layout when loading. (Read 32 bytes but expected 68 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
- Out-of-bounds memory access with multiple CanvasRenderers under a Canvas when using Mesh API
- Inspector tries to access file after it was deleted when the file was locked in Inspector window
- Changing Transform values in Search window Inspector loses focus while dragging and stopping mouse without releasing dragging action
- Saving changes on the dirty VFX Graph during the Play mode throws "The referenced script (Unknown) on this Behaviour is missing!" warnings
- VFX Graph Debug Info overlaps the "Initialize" block debug info by default
Resolution Note:
This issue is related to the specific project using a Unity API method in a static constructor, which is not allowed in this case.
Resolution Note (2023.1.X):
This issue is related to the specific project using a Unity API method in a static constructor, which is not allowed in this case.