Search Issue Tracker
Won't Fix
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
- Unity CIL Linker fails on Player build when persistent listeners have "<" and ">" in their XML attribute names
- ”Lighting data asset ‘LightingData’ is incompatible with the current Unity version…” warnings are thrown when saving Indoors (URP) and Outdoors (URP) Scenes as Scene Templates
- [iOS] The screen blinks when transitioning from custom to Unity splash screen
- [macOS] ”Ignoring depth surface load action as it is memoryless” warnings are thrown when taking Game View Snapshot
- UI Builder Inspector scrolls back up when changes on an expanded but not fully displayed Inspector tab are saved
Resolution Note:
GetClass is not supported for Interfaces inside namespaces. This has been fixed in 2022.2.