I have something of a general question involving using native C/C++ plugins in a Unity Android project, using the free version of Unity.
I built a shared library in the “standard” fashion using the Android NDK and placed the “libMyPlugin.so” file in the Assets/Plugins/Android folder.
Upon trying to load the library via [DllImport(“MyPlugin”)] in a C# script in the assets folder, I receive the following error in the Unity Editor:
However, if I perform “build and run” in the editor, using an android device connected to my computer, I witness the expected behaviour in the app on my device.
It would seem that there may be some additional steps that are required to import the shared library within a script when the project is run in the Unity Editor.
Is anyone aware, having seen these errors, of a means to accomplish this? That is, in summation:
A means to import a shared library within a C# script, in an Android project using the free version of Unity, when running the game in the Unity Editor?
Windows 8, 64 bit
Unity version: 4.5.1f3