- Home /
Why does unity output 2 copies of my plugin DLL when I build?
To start off, my DLL is all working perfectly fine in my project, both in the editor, and in the build. However, I've noticed that when I do a build, it gives me 2 copies of my DLL, each in a different location:
MyProject_Data/Plugins/MyDLL.dll MyProject_Data/Managed/MyDLL.dll
Why have 2 copies? This is a sizable DLL (about 10MB) so I really don't want to be including 2 copies of it if I really don't have to. I've tried deleting the copy that's in the Managed folder, and it appears that everything works fine when I do so (whereas if I delete the one in the Plugins folder, my app fails to use the DLL's functions). However, the next time I build, Unity is going to recreate both copies of my DLL.
Some more details, in case they matter: I'm using Unity 4.3.4f1. The .DLL is one I created and am using as a plugin. (it's in my Assets/Plugins directory). I've set it up my methods using the custom DllImport syntax required by the unity plugin system. (something like [DllImport("MyDLL")]
Your answer
Follow this Question
Related Questions
Finding the Problematic dll in "Extracting Referenced dlls Failed" (Unity5) 1 Answer
Native c++ (mingw) plugin works in editor but not in build 1 Answer
Uniwii DLL found in editor but not in build version 3 Answers
Distribute terrain in zones 3 Answers
"DllNotFoundException: htmlTexture" How to let Unity find the DLL? 0 Answers