Search Issue Tracker
Fixed
Fixed in 2022.2.9f1, 2023.1.0a24
Won't Fix in 2022.1.X
Votes
2
Found in
2022.1.23f1
2022.2.0b16
2023.1.0a20
Issue ID
UUM-19452
Regression
Yes
Asset Bundles fail to build when adding a [SerializeField] value to code after building the Player
How to reproduce:
1. Open the user-attached project
2. Build the Asset Bundles (BuildTest → Build AssetBundles)
3. Create a Build (File → Build Settings)
4. Create a new variable with a “[SerializeField]” in the “BundlePrefabComponent.cs” Script and save
5. Build the Asset Bundles (BuildTest → Build AssetBundles)
Expected result: No errors and the Build Succeeds
Actual result: Errors are thrown in the Console and the Build Fails
Reproducible with: 2022.1.0a2, 2022.1.23f1, 2022.2.0b16, 2023.1.0a20
Not reproducible with: 2020.3.42f1, 2021.3.14f1, 2022.1.0a1
Reproducible on: macOS Monterey 12.6 (Intel)
Errors:
1. “Type '[Assembly-CSharp]BundlePrefabComponent' has an extra field 'v' of type 'System.Int32' in the player and thus can't be serialized”
2. “Fields serialized in Editor, class 'BundlePrefabComponent'
'm_property' of type 'System.Int32'“
3. “Fields serialized in target platform, class 'BundlePrefabComponent'
'm_property' of type 'System.Int32'
'v' of type 'System.Int32'“
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
- Warning 'GetControlID at event ValidateCommand returns a controlID different from the one in the Layout event' is logged when undoing the deletion of an Edited Freeform 2D Light
- ShadowCaster2D breaks on certain Rotation positions when Casting Source is set to PolygonCollider2D
- The options modal for which type of Tilemap to create isn't drawn when it has been previously closed until the user moves their cursor
- There are 2 Overlay Menus present in the Tile Palette Window
- Unable to change the Shadow Map resolution for lights via Inspector when 'preserveCachedShadow' is enabled
Resolution Note (2022.1.X):
Backport to branch 2022.1 has stopped as it reached end of life