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
- ResolveUsePasses now extracts passes from all subshaders including fallbacks, in contrast to documented behaviour
- [UIBuilder] Changes aren't detected on types implementing IList
- [HDRP] Text is rendered with artefacts when using STP and resolution scale is set a float value
- [Settings Search] Search results not always matching search term correctly
- Crash on memcpy when opening a project that loads TSS files
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 :)