Search Issue Tracker
Fixed in 2022.2.X
Votes
7
Found in
2017.4
2019.3.0f6
2020.1
Issue ID
1218837
Regression
No
MonoScript.GetClass returns null when the script contains a Struct inside a Namespace or an Interface inside a Namespace
How to reproduce:
1. Open the project "case_1218837-MonoScript.GetClass"
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 results: when "IWithNamespace" is selected, the text "Type: IWithNamespace" occurs; when "WithNamespaceStruct" is selected, the "Type: WithNamespaceStruct" occurs
Actual results: in both cases the text "Error: Type not found in the specified script" occurs meaning that MonoScript.GetClass returns null
Reproducible with: 2017.4.37f1, 2018.4.17f1, 2019.3.1f1, 2020.1.0a23
Note: MonoScript.GetClass() returns System.Type when a script contains a Class, an Interface, a Struct or a Class inside a Namespace
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
- [iOS] Application.absoluteURL is empty on Awake/Start when opening via deep link with Splash Screen disabled
- Crash on MemoryManager::Deallocate when rapidly calling Addressables.LoadAssetAsync
- Crash on physx::shdfnd::atomicIncrement when adjusting values on a character controller component after entering Play mode in Prefab edit mode
- [Rendering Debugger] [NewInputSystem] Debug Overlays in Play mode throws InvalidOperationException when using New Input System
- [RenderingDebugger][InputSystemPackage] Ctrl+Backspace shortcut doesn't work to open the Rendering Debugger when New Input System is in use
Resolution Note (fix version 2022.2):
Fixed in: 2022.2.0a3