Search Issue Tracker
By Design
By Design in 2020.3.X
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
- Font character thickness does not adjust properly in UI Toolkit text when changing Bold Weight in Font Asset
- Multiple "[...] is inaccessible due to its protection level" errors are thrown when opening project with Unity Version Control installed
- Sorting icons are tiny and misaligned in Import Activity window
- The Undo system does not record HideFlags.HideInHierarchy changes
- [Linux] Bug Reporter window is in Light mode when the Editor theme is Dark mode
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 :)
Resolution Note (2020.3.X):
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 :)