Search Issue Tracker
Fixed
Fixed in 2022.3.36f1, 6000.0.9f1, 7000.0.0a1
Votes
7
Found in
2021.3.38f1
2022.3.30f1
6000.0.4f1
Issue ID
UUM-72953
Regression
No
Failure to skip analysis of code generated by MonoScriptInfoGenerator when the Roslyn analyzer that inherits from DiagnosticAnalyzer is used
How to reproduce:
1. Open the “AnalyzerUnityTest“ project
2. Open the “SampleScene“
3. Enter the Play Mode
4. Exit the Play Mode
5. Navigate to the projects folder
6. Observe the “VisitedFiles.txt“ file
Expected result: No “Unity.MonoScriptGenerator.MonoScriptInfoGenerator“ files are checked by the analyzer
Actual result: “Unity.MonoScriptGenerator.MonoScriptInfoGenerator“ files are checked by the analyzer
Reproducible with: 2021.3.38f1, 2022.3.30f1, 6000.0.4f1
Reproducible on: macOS 13.5.2 (Intel)
Not reproducible on: Windows 10 Pro (22H2)
Note: The issue is caused when the code snippet “context.ConfigureGeneratedCodeAnalysis(GeneratedCodeAnalysisFlags.None)“ is placed in the Initialize method of the Roslyn analyzer script
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
- Inconsistent behaviour when interacting with different dropdown types with pointer events on parent Visual Element
- Hidden GameObjects won't re-enable when they have call "DontDestroyOnLoad" function
- Overlay Canvas are rendered on each split-screen camera when HDR is enabled
- [Android] The Player loses focus when using UnityEngine.Handheld.StartActivityIndicator() with Facebook SDK
- Build fails with "Building Library/Bee/artifacts/MacStandalonePlayerBuildProgram/gahcy/hj9mx3z/951.0 failed with output:..." errors when Scripting Backend is set to IL2CPP
Resolution Note (fix version 6000.0.9f1):
Thanks for the report, we changed the code generator output file so it has a .generated.cs extension
Resolution Note (fix version 2022.3.36f1):
Thanks to report this, we fixed the generated code.