- Home /
Using a C file as a plugin
I'm having some issues trying to make a C file able to be referenced from in Unity. I have compiled the C file into both a .so and .dll file, placed them in Assets, Assets/Plugins, Assets/Plugins/Android, and the same folder that the Javascript file I'm referencing the C library from is located. All tested on separate occasions, and all haven't worked, and always brought up the same DllNotFoundException.
Within the Javascript file I am referencing to the library using the following format:
@DllImport ("libMYLIB.dll")
static private function doStuff(foo : String) : float[] {};
and further in the code:
var results = doStuff(myString);
Is this the correct way to reference the library?
Your answer
Follow this Question
Related Questions
Is there a way to compile C files/libraries within a webplayer? 0 Answers
Does anyone know a Screen recorder equivalent for android? 2 Answers
Setting Scroll View Width GUILayout 1 Answer
Encrypt native plugins/protect IP 0 Answers
Can someone help me fix my Javascript for Flickering Light? 6 Answers