Hi, I’m getting the following when I try incorporate some plugins I want to use, I get the following error.
Internal compiler error. See the console log for more information. output was:
Unhandled Exception: System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.
at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (bool)
at System.Reflection.Assembly.GetTypes () [0x00000] in <filename unknown>:0
at Mono.CSharp.RootNamespace.ComputeNamespaces (System.Reflection.Assembly assembly, System.Type extensionType) [0x00000] in <filename unknown>:0
at Mono.CSharp.RootNamespace.ComputeNamespace (Mono.CSharp.CompilerContext ctx, System.Type extensionType) [0x00000] in <filename unknown>:0
at Mono.CSharp.GlobalRootNamespace.ComputeNamespaces (Mono.CSharp.CompilerContext ctx) [0x00000] in <filename unknown>:0
at Mono.CSharp.Driver.LoadReferences () [0x00000] in <filename unknown>:0
at Mono.CSharp.Driver.Compile () [0x00000] in <filename unknown>:0
at Mono.CSharp.Driver.Main (System.String[] args) [0x00000] in <filename unknown>:0
I know the Webplayer doesn’t allow System.Reflection due to security reasons, but isn’t it possible on a Desktop build?
I decompiled the DLL found in the Mono.CSharp Unity folder and traced though the error code until I landed at a function that I THINK replaces any built-in types with Unity-specific types, called CheckDefinitions(ModuleContainer module) in BuildinTypes.cs.
I feel like I’m close but I’m getting a bit stuck. Do any Unity software engineers or mono modding gurus want to chime in possibly? If this is just an issue of Unity’s security, if you could point me in the right direction to remove the restriction on System.Reflection use, I would happily take it out at my own risk.
Any advice from anyone? I really need some guidance on this. Even if you’ve had a similar error, please post about it! Anything is helpful. I’ve checked the other two posts similar to this, but trying their methods did not solve my problem.
In case you haven’t found a solution, I had the same problem occur when using named parameters. In my case I was using them when calling the Facebook Unity SDK FB.Apprequest.
EDIT: I noticed that named parameters worked SOMETIMES. I had simply changed that parameter set I was using when the error popped up. This makes me think it has something to do with certain default parameters not playing nice when included/excluded from the named parameter set.