Search Issue Tracker
By Design
Votes
0
Found in
2020.3.40f1
Issue ID
UUM-17491
Regression
No
Unity is not communicating correctly with Microsoft.Unity.Analyzers when Scripts are imported
Reproduction steps:
# Open the attached project
# Observe the Console
Expected result: “Component 'MyTestScript' should not be instantiated directly” error is thrown in the Console
Actual result: No errors are present in the Console
Reproducible with: 2020.3.40f1, 2021.2.0a5
Not reproducible with: 2021.2.0a6, 2021.2.19f1, 2021.3.12f1, 2022.1.20f1, 2022.2.0b12, 2023.1.0a16
Reproducible on: M1 MacOS 12.4 (21F79), Windows 10 (21H2)
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
- Shortcut Manager shows empty conflict filter when resolving runtime conflicts involving different contexts
- Building the project for Web with ASTC Texture Compression results in black screen
- “ArgumentException: Object reference not set to an instance of an object” errors are thrown when adding the component with Entity as Key for HashMap
- Visual Effect Model overlays tooltip is left in Scene when unfocusing VFX Node and the overlay dropdown menu is opened
- Unity crashes during the scene template selection in the "Inspector" tab
Resolution Note:
The issue seems to be that the Microsoft.Unity.Analyzers.dll might not work with 2020.3 in particular, because the Roslyn version we use is older than e.g. what VS uses. It works with 2021+ because we updated it for those versions :)