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?