Search Issue Tracker
By Design
Unknown (hidden) 2023.1.X
Votes
0
Found in
2022.2.0a13
Issue ID
UUM-3565
Regression
No
Roslyn Source Generator generates a class multiple times
Reproduction steps:
1. Open the attached 'Roslyn Code Gen Test' project
2. Add the 'TestCodeGen.dll' to the project
3. Observe the 'TestCodeGen.dll' in the Inspector
4. Add the 'RoslynAnalyzer' Asset Label to the 'TestCodeGen.dll'
5. Wait for the script compilation to complete
Expected result: No warnings are in the Console
Actual result: Warning CS0436 appears in the Console
Reproducible with: 2021.3.1f1, 2022.1.0b16, 2022.2.0a13
Could not test with: 2019.4.38f1, 2020.3.34f1 (Assembly 'Assets/TestCodeGen.dll' will not be loaded due to errors)
Full warning:
Assets/HelloFromSourceGenerator.cs(10,16): warning CS0436: The type 'ExampleSourceGenerated' in 'TestCodeGen/ExampleSourceGenerator.ExampleSourceGenerator/exampleSourceGenerator.cs' conflicts with the imported type 'ExampleSourceGenerated' in 'Unity.PlasticSCM.Editor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'TestCodeGen/ExampleSourceGenerator.ExampleSourceGenerator/exampleSourceGenerator.cs'.
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
- var VisionOSEDRHeadromm has a comma instead of a dot when building with Metal Rendering App Mode and local OS localization is set to German
- IAP Catalog remove product “x” and add product “+” buttons are not consistent with other remove and add buttons in the Editor
- Performance issues in Play Mode when quickly hovering the mouse cursor over Hierarchy GameObjects
- Frame Debugger displays incorrect output when FidelityFX Super Resolution or Spatial-Temporal Upscaler is used with Temporal Anti-aliasing or Subpixel Morphological Anti-aliasing
- The layout system is failing to correctly calculate or apply the height of the Japanese fallback font when the primary English font's metrics are used
Resolution Note:
By design, however, we will improve the documentations to explain why this is happening. https://jira.unity3d.com/browse/DOCF-1192