Search Issue Tracker
Won't Fix
Won't Fix in 2021.3.X
Votes
0
Found in
2020.3.45f1
2021.3.19f1
Issue ID
UUM-27742
Regression
No
[Backport] MonoScript.GetClass returns null when the script contains a struct inside a namespace or an interface inside a namespace
Steps to reproduce:
1. Open the “MonoScriptGetClassIssue” project
2. Select Tools -> Type Interface Check in the Menu Bar
3. Select "IWithNamespace" script in the Data Script and observe the results in the Interface Check window
4. Select "WithNamespaceStruct" script in the Data Script and observe the results in the Interface Check window
Expected result: when "IWithNamespace" is selected, the text "Type: IWithNamespace" occurs and when "WithNamespaceStruct" is selected, the text "Type: WithNamespaceStruct" occurs
Actual result: in both cases the text "Error: Type not found in the specified script" occurs
Reproducible with: 2020.3.45f1, 2021.3.19f1, 2022.2.0a2
Not reproducible with: 2022.2.0a3, 2022.2.7f1, 2023.1.0b4, 2023.2.0a3
Reproduced on: macOS Monterey 12.2 (Intel)
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:
GetClass is not supported for Interfaces inside namespaces. This has been fixed in 2022.2.
Resolution Note (2021.3.X):
GetClass is not supported for Interfaces inside namespaces. This has been fixed in 2022.2.