I think it’s excellent that Android exports are now supported in the free version - does this also allow the ability use native code?
I’ve added my library objects to Assets->Plugins->Android and attempted to import them but I get an error:
Assets/TestFile.cs(15,10): error CS0246: The type or namespace name `DllImport’ could not be found. Are you missing a using directive or an assembly reference?
Should this work on the Android export enabled free version of Unity?
Edit:As always, minutes after posting I find I was missing an “using System.Runtime.InteropServices;” … My dll import error has now gone… Haven’t got anything working yet so the question still remains if native code is supported…
Hmm, I still can’t get it to see my library - I keep getting DllNotFoundException when running on an Android device.
The library I’m loading depends on a second library (which is included as a libXXX.so) - I’ve seen some mention of people having issues with library ‘chaining’ is this still an issue with Unity? If so are there any workarounds?
library chaining is a pretty big troublemaker.
This is not a unity problem but one of ‘who defines the search context’.
Unity as any application will search for it in a single predefined place + the global $path folders yet the other library might assume a path relative to something else.
The general solution is to either add the library folder to $path or to move the library there, unsure though if either of the two can work on android.