Quantcast
Channel: Questions in topic: "dllimport"
Viewing all articles
Browse latest Browse all 160

How to properly use my own DLLs in Unity?

$
0
0
I have been working on an unity tool and at this point I need an external library to be used (DLL) but at the moment of using any referenced function: [DllImport("soloud_x86.dll", CallingConvention = CallingConvention.Cdecl)] internal static extern IntPtr Soloud_create(); public Soloud() { objhandle = Soloud_create(); } It return an error saying DLLNotFoundException, I supposed that the problem was the [Dllimport] but error is thrown in the fifth line that is where the function is used. Because of this I don't know if it finds the Dll and then it doesn't read properly the function or it doesn't even find the library. I have tried putting the Dll with almost every build configuration and in every plugins/editor folder but it is always the same.

Viewing all articles
Browse latest Browse all 160

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>