• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
2
Question by YourGoodFriend · Apr 23, 2012 at 03:17 PM · debugexception

Debug System.Reflection.ReflectionTypeLoadException

Hello all,

I am running into an issue importing a 3rd party library to which I do not have source access. Importing it using the "PC and Mac Standalone" profile works just fine, but it bombs out on the Web Profile. I'm aware the Web Player is limited beyond good and evil but this is not what this question is about.

How is one supposed to debug Exceptions like the following without having access to the source?

 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 

Thank you for any help.

Comment
Add comment · Show 4
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image $$anonymous$$ · Apr 24, 2012 at 08:10 AM 0
Share

Well, as you said, WebPlayer is limited :

"Disallowing the usage of System.Reflection.* to call private/internal methods in classes you did not write yourself. "

(ref : http://unity3d.com/support/documentation/$$anonymous$$anual/Security%20Sandbox.html)

I think your case may be hopeless.

avatar image anubhav756 · Apr 01, 2015 at 04:41 PM 0
Share

man, im having the exact same issue.

I had this issue after i updated to unity 5. So, i tried to isolate the fault by using a fresh project, and i found a third party plugin (Photon Unity 3D) causes this issue, and that too while in a windows build.

Please somebody, answer this question

avatar image catena · Apr 02, 2015 at 05:21 AM 0
Share

Hi,

I'm having the same issue too.

avatar image Riwels · Apr 08, 2015 at 04:45 AM 0
Share

@anubhav756 @catena Check my answer. $$anonymous$$aybe it helps you.

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by MrLucid72 · Jan 20, 2016 at 09:28 AM

For me, it was the imported store asset. I deleted the plugins folder and all is well.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Riwels · Apr 08, 2015 at 04:42 AM

This question is extremly old, but I'm having the same error with Unity 5 and seems more people has the same issue so I post my workaround and hope it helps to someone else.

In my project, the issue is caused by UVC package. It comes with DLLs instead of source code.

When UVC is in the project, any package that adds custom menus to the editor, will throw the error. I only have 1 custom menu and it's useless, so the workaround is to remove it renaming the packages's "Editor" folder. People with tons of/or useful custom menus will need to find a different workaround or avoid using packages without source code.

Edit: I found that renaming "Editor" folders doesn't remove the custom menu, but it fixes the issue, so the workaround should be valid to people with more custom menus.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image sqy12 · May 13, 2015 at 01:42 PM 0
Share

You'll get error while building you project if you don't put the editor scripts into the editor folder.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

7 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

What to do when there is an error at runtime 1 Answer

No line numbers in stack trace 1 Answer

Asserts not working (Debug.assert or Assertions.Assert.xxx(xx.)) 1 Answer

Is there any way to handle Exception without outputting as log. 0 Answers

Show error when running in Application. 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges