Search Issue Tracker
Fixed in 2022.3.8f1
Fixed in 2022.3.X, 2023.1.X, 2023.2.X, 2023.2.0b5, 2023.3.X
Votes
5
Found in
2022.2.7f1
2023.1.0b4
2023.2.0a4
Issue ID
UUM-28069
Regression
Yes
Multiple errors are displayed in the Player when using Serialized Generics
Steps to reproduce:
1. Open the attached project “IssueProject“
2. Open the “Assets/Scenes/SampleScene.unity“ Scene
3. Navigate to File > Build Settings
4. Enable Development Build
5. Build And Run the project
6. Observe the Player
Expected result: No errors are displayed
Actual result: The following errors are displayed “A scripted object (probably GenericSerializationTest?) has a different serialization layout when loading. (Read 48 bytes but expected 88 bytes)
Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?“
Reproducible with: 2020.3.32f1, 2022.1.0a4, 2022.1.24f1 2022.2.7f1, 2023.1.0b4, 2023.2.0a4
Not reproducible with: 2021.3.19f1
Fixed in: 2020.3.33f1
Couldn’t test with: 2022.1.0a3 (unable to resolve the “'C:/Program' is not recognized as an internal or external command,
operable program or batch file.“ error)
Reproducible on: Windows 10
Note: Look at the attached video (“IssueVideo“) for clarity
Comments (1)
-
Pitou22
Jul 24, 2023 23:11
See also a duplicates from this issue: https://issuetracker.unity3d.com/issues/different-serialization-layout-is-used-when-script-is-outside-of-the-parent-class-assembly
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
- Texture Import Warnings are obscured by other Terrain Layer options in the Inspector
- Burst Inspector middle divider is jittering when resized with the Burst Inspector window docked
- JsonConvert conversion fails trying to call GetCallbackMethodsForType when [OnDeserialized] is used in a class
- Different text alignment in the column header in Entities "System" window
- Objects with Universal Render Pipeline/Particles/Lit shader are always lit up when changing their Rendering Layer Mask
Resolution Note (fix version 2023.3):
Fixed in: 2023.3.0a1