I am trying to build my unity project for android. I have added a dll from a separate visual studio project into my unity project to make some web service calls easier to handle.
I have the dll referenced from monodevelop, as well as dropped in a 'plugin' folder on the Asset level in my unity project.
I have set my .NET compatibility to 2.0 (from 2.0 subset)
The dlls were built in .NET 3.5.
The project runs fine when I hit the 'play' button in unity.
When I try to build for android, I get the following error:
TypeLoadException: A type load exception has occurred. UnityEditor.HostView:OnGUI()
Error building Player: Extracting referenced dlls failed.
I have no idea what the problem is. I had enough of a headache trying to get the dlls working as expected in the unity project. Everything seems to work fine until I go to build/export. Help!
asked Aug 07 '12 at 03:38 AM
OK after much tinkering I have resolved this issue.
The original VS2010 project that I built my included dll from also had a reference to a MySQL dll. Adding a copy of that dll into the 'Plugin' folder on my project resolved the issue - I can now build to android no problems.
I'm not sure if I am supposed to mark answers to my own question as accepted? Let me know and I will do so.
answered Aug 07 '12 at 12:10 PM