How to use a C++ dll in Unity3D?

后端 未结 3 1035
我寻月下人不归
我寻月下人不归 2021-02-02 03:30

I am aware of this similar question, but it does not respond to my problem.

I have written two .dlls using Visual Studio 2010. One is in C++, and communicat

3条回答
  •  花落未央
    2021-02-02 04:24

    This also happens when Unity can find your DLL, but is not able to find it's dependencies. Obvious fix is to place dependency DLLs into /Plugins as well, or link your dependencies statically.

    Less obvious reason is when your DLL depends on Visual Studio runtime library dynamically, i.e. is built with Properties -> C/C++ -> Code Generation -> /MD option. Change it to /MT to link with runtime statically.

提交回复
热议问题