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
- Channel remapping dropdown in the Terrain Layer does not open when clicked on the title
- The Editor freezes indefinitely when a large number of elements are entered in the Subgraphs or Categories lists
- Some Visual Effects package Assets links to documentation are not working
- Heatmap asset’s documentation button in the Inspector window leads to “Sorry... that page seems to be missing!” page when clicked
- Crash on MonoBehaviour::CallMethodIfAvailable when performing various actions
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 :)