Search Issue Tracker
Fixed
Fixed in 6000.0.60f1, 6000.2.7f1, 6000.3.0b6, 6000.4.0a2
Votes
1
Found in
6000.0.55f1
6000.2.0f1
6000.3.0a4
6000.4.0a1
Issue ID
UUM-115834
Regression
Yes
GeneratePropertyBag code generation fails when "?" nullable is used with the "partial" class modifier
How to reproduce:
1. Open the project “IN-111253_serialization-repro”
2. Observe the Console
Expected result: No Unity.Properties.SourceGenerator errors in Console
Actual result: Unity.Properties.SourceGenerator errors in Console
Reproducible with: 6000.0.0b12, 6000.0.55f1, 6000.2.0f1 (eed1c594c913), 6000.3.0a4
Not reproducible with: 6000.0.0b11 (a707ca4efec4)
Reproducible on: Windows 11, macOS 15.5 (M3)
Not reproducible on: No other environments tested
Notes:
- The error can be fixed by using exclusively the “partial” class modifier or removing the “?” nullable. This can be done in the TestScript.cs file
- Errors:
** {{Unity.Properties.SourceGenerator\Unity.Properties.SourceGenerator.PropertyBagGenerator\Bar_PropertyBag.cs(1,18): error CS1514: { expected}}
** {{Unity.Properties.SourceGenerator\Unity.Properties.SourceGenerator.PropertyBagGenerator\Bar_PropertyBag.cs(1,18): error CS1513: } expected}}
** {{Unity.Properties.SourceGenerator\Unity.Properties.SourceGenerator.PropertyBagGenerator\Bar_PropertyBag.cs(1,18): error CS1031: Type expected}}
** {{Unity.Properties.SourceGenerator\Unity.Properties.SourceGenerator.PropertyBagGenerator\Bar_PropertyBag.cs(2,1): error CS8803: Top-level statements must precede namespace and type declarations.}}
** {{Unity.Properties.SourceGenerator\Unity.Properties.SourceGenerator.PropertyBagGenerator\Bar_PropertyBag.cs(3,5): error CS0106: The modifier 'internal' is not valid for this item}}
** {{Unity.Properties.SourceGenerator\Unity.Properties.SourceGenerator.PropertyBagGenerator\Bar_PropertyBag.cs(8,64): error CS1525: Invalid expression term 'sealed'}}
** {{Unity.Properties.SourceGenerator\Unity.Properties.SourceGenerator.PropertyBagGenerator\Bar_PropertyBag.cs(8,64): error CS1002: ; expected}}
Comments (1)
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
- Uninitialized variable warning appears in the Inspector of a custom shader when the variable is initialized
- "Failed creating toolbar element from ID..." error is thrown when resetting the Scene view Overlay layout while an Asset Transformer Toolbox overlay is active
- Entity ID for Font Assets is serialized twice which throws an error when using Debug Inspector
- Play Mode can be entered when disabling Adaptive Performance and pressing either the Play Mode button or the keyboard shortcut to enter Play Mode before recompilation leading to errors and warnings thrown
- Parent ListView element also becomes selected when inner ListView element is selected
alijutt69109
Aug 29, 2025 10:16
Thanks for marching