I am trying to import a third-party static library as a plugin into unity. I copied the library to Assets/Plugins/x64
folder and set the OS of the Plugin to Windows
and architecture to x64
. However, while it compiles the code fine, when I run the scene that uses the code from this static library, it complains DllNotFoundException: cspice assembly: type: member:(null)
. Can Unity import static libraries? I have this static library imported using the PINVOKE feature like this:
[DllImport("cspice")] public extern static void furnsh_c(string file);
I can confirm that the script for these PINVOKE statements and the static library (cspice.lib) are located in the same directory. Note that I don't have this issue with plugins that have a dynamic link library (DLL).
I would any suggestions/recommendations to get this working.
Thanks, Datri