I have been trying to use DllImport ("filename.dll") in C# Unity and found below things
Unity/C# is able to recognize independent .dll files ie
If dll A is not dependent on any other dlls it is recognized
Unity/C# is not able to recognize dependent .dll files ie
If dll A is not dependent on dll B,dll C,dll D etc then dll A is not recognized, although all the 4 dlls( A,B,C,D dlls ) are in same location
.................................................................................................... .....
I have used dependency Walker for UnityInterface2.dll and found out that it depends on OpenNI2.dll, NiTE2.dll, msvcp90d.dll and kernel32.dll. I have placed all of these in project folder of Unity and also in 4.5 folder , but the issue still persists.
Can I know how do I make C# code recognize a dll (UnityInterface2.dll) which depends on other dlls
(OpenNI2.dll, NiTE2.dll, msvcp90d.dll and kernel32.dll) in Linux ? Please help
Linux Unity: Recognize dependent dll files
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Bhuvanesh MohankumarRank #310 · 8.1K reputationPosted May 17, 2016, 1:13 AM EDT
First register all the non dependent files before other assembly registration.
Whenyou register the dependent assemblies, it requires the resolve value of the dependent assembly which is already registered.
BM Ashok7 reputationPosted May 17, 2016, 7:15 AM EDT