- Home /
Copy dlls to ouput directory
I have an external process that I want to start alongside my game in Unity. That external process relies on some dlls. I want all of that to be included within my unity project and exported alongside it. When I add the executable and the dlls on my Unity Project folders Unity automatically tries to actually include the dlls in its codebase and failes with a TypeLoadException.
How can I tell Unity to ignore this dlls and simply output them alongside the executable?
Answer by Dave-Carlile · Jun 10, 2016 at 12:56 PM
Resources placed in the StreamingAssets folder will be ignored by Unity and just copied out as part of the build.
If for some reason that doesn't work for you you can use the PostProcessBuildAttribute to define a method that will be executed after your app is built. In that method you can manually copy out the dlls to your build folder using file io.
Your answer
Follow this Question
Related Questions
Why can't I build Web Player in Unity while I have no problems with building standalone versions? 2 Answers
Unity as a VST's interface? 0 Answers
Connecting external application (e.g. Notepad) to Unity 0 Answers
Can you start another application by running an Unity project? (using a proxy dll) 1 Answer
opencv split method crashed in unity ,OpenCV split (frame,vector) method crashed in Unity 0 Answers