i got some trouble with native Plugins.
I compiled the pointCloudLib (PCL) into a static and dynamic lib.
Both of them can’t be found when calling them like your documentation descripes. (Unity - Manual: Native plug-ins)
Tryed import with:
System DllNotFoundException: libnative.so / native
at (wrapper managed-to-native) CallNativeCode: add(single,single)
at CallNativeCode._callAdd (Single x, Single y) [0x00000] in <filename unkown>:0
at Thesis.Scripts.AppController.Update () [0x00000] in <filename unkown>:0
File location of Plugins are \Assets\Plugins\Android
Even your sample AndroidNativePlugin-file doesn’t work for me.
(Unity - Manual: Native plug-ins for Android)
Maybe I’m doing something wrong.
I tryed with followed Unity-versions:
The issue seems to be that the .so file in the package is out of date.
Here are the proposed steps to recompile the .so file:
You will need to use the NDK for this but it is a requirement for native plugin use so you should already have this installed.
Follow the steps as described in the ‘Native plug-in Sample’ to set up the test project.
Download the the zip file.
Extract the AndroidNativePlugin.unitypackage file.
Open the Unity Editor.
Create a new Project.
In the new project click Assets > Import Package & Custom Package.
In the Import Package file dialog, navigate to the location in which you extracted the file and select it.
Next you will need to use the NDK build command to rebuild the libnative.so
Open a command prompt and navigate to: \Assets\Plugins\Android\src
Run the following command:
dk-build.cmd NDK_PROJECT_PATH=. NDK_APPLICATION_MK=Application.mk*
This may warn you that the requested android NDK version is not supported but it will just use the minimum supported version for your installed NDK.
This will produce a new libnative.so file.
3. Copy the new libnative.so file from: \Assets\Plugins\Android\src\libs\armeabi
to \Assets\Plugins\Android
This will replace the old libnative.so file which is already in that location and this got rid of the exception.
I have notified the developers to update the Manual with a recompiled .so file, but I hope until then the steps mentioned above will help you out!