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
- Unnecessary modifications clutter the Scene when using a RectTransform driven by a LayoutGroup in a Prefab
- Files in the target folder are deleted without a proper warning when building an iOS project
- Character animation freezes when toggling animator on/off in a coroutine
- Certain textures are incorrectly marked in the render pass list when observed through Render Graph Viewer
- "Assertion failed on expression" error occurs when multiple Animation Components are instantiated after changing the Culling Type
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 :)