DllNotFoundException in unity3d plugin for c++ dll

后端 未结 7 1592
死守一世寂寞
死守一世寂寞 2021-01-11 17:49

I am working on the Unity Plugin project and try to import the c++ native dll from c# file. But I keep getting dllnotfoundexception.

c++ dll code:

7条回答
  •  滥情空心
    2021-01-11 18:34

    Put the DLL(s) Unity interfaces with in Project\Assets\Wherever\Works\Best\Plugins.

    Place any dependency DLLs that are not directly accessed by your scripts in Project. This will allow your program to run in the editor.

    When you build, again copy the dependency DLL files, this time to the root of the build directory (right next to the generated executable). This should allow your application to load them at runtime.

    (Tip: you can use Dependency Walker look at you DLLs and see what they depends on.)

提交回复
热议问题