How To Fix a TypeLoadException in Unity

Problem

Your Unity console shows something like this: 

TypeLoadException: Could not load type 'MyAssembly.MyType' from assembly MyAssembly.

Solution

  1. Open your Unity project and go to your Assets folder and search for all DLLs (Use the windows search and type: „extension:.dll“)
  2. Sort the results by name and check if you have a duplicate DLL file in your results and remove duplicates. If one DLL exists inside an Editor folder, then ensure to remove the DLL which is inside that Editor folder.

Schreibe einen Kommentar