bbbscarter / UberLogger

Replacement logging framework for Unity, with a new editor and in-game console
MIT License
475 stars 62 forks source link

TypeLoadException #27

Closed rthompsonj closed 7 years ago

rthompsonj commented 7 years ago

Any idea why UberLogger might be causing a TypeLoadException? My project just recently starting crashing the editor constantly leaving errors in the log similar to:

TypeLoadException: Could not load type 'UnityEngine.Networking.NetworkLobbyManager' from assembly 'UnityEngine.Networking, Version=1.0.0.0, Culture=neutral, PublicKeyToken=
null'.

Although the class it mentions that it could not load varies and is not always the same. Once I remove UberLogger from the project it runs fine =/

I am using Unity 5.5.3p2 on macOS.

Kalmalyzer commented 7 years ago

I have never experienced this myself, nor heard of it before. A bit of googling suggests that most people who encounter any form of "Could not load type <...>" error get it because of .NET version incompatibilities, usually surrounding attempting to pull in a .NET 4 plugin into a Unity project (for example by putting some of your code into a separate DLL, building that DLL outside of Unity targetting .NET 4+, and then providing that precompiled DLL to Unity), or by mismatching DLL versions (for example dropping in an older version of a Unity DLL into the primary search directory for Unity).

Did you manage to find out what caused this?

rthompsonj commented 7 years ago

Hey Kalmalyzer sorry for the late reply! After further investigation I'm starting to think my issues weren't directly related to UberLogger. We started getting random typeload exceptions in our huge project regardless of what plugins were present. They all seemed to be red-herrings and the only way out was to delete the library and reimport the project. Thanks for taking the time to get back to me.