- Home /
c# dll works on desktop but not on android
Hi,
i have a dll that does stuff.
Now it completely works on the desktop (when i use play button) , but on the device itself it doesn't seem to even call the methods in the dll.
Does anybody have a solution for this ?
Are you sure the DLL is a pure managed DLL? where is it located relative to your assets folder? Have you written the DLL?
All your scripts get compiled into a DLL and this DLL is packed into your game so in general pure managed DLLs always work.
Do you build for iOS, Android, WP, ...?
Just reread the title ;)
Are you using DllImport to bring in the functions? A lot of dll's are compiled for specific platforms, so if it works in the editor that probably means it wasn't compoled for Android.
I have written the dll myself in visual studio 2010 with c# and then just placed it in the "plugins" folder of the project.
Answer by PAHeartBeat · Dec 03, 2014 at 05:03 AM
I think it's due to .net version diffrent. May be your dll is compplied using .Net 3.5 / 4.0, but unity works on Mono (.Net 2.0) so change your frmawork in visual studio project setting and recompile it. using .Net 2.0 framework, and if you using stripings then also add linker file for your all used namesapce which you have used in DLL files.
Your answer
Follow this Question
Related Questions
Managed Plugin Can't Reference Unity Plugins 0 Answers
Using dll's from C#? 4 Answers
Using Native C++ dll in Unity 1 Answer
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers