I am trying to build a plugin that I can call through a unity project on ML2.
The plugin builds on Android Studio for x86_64 release. However on ML2, the library is unreachable. It seems to me I don't have the right config to build for ML2 on Android studio.
I have followed the "Android Studio Workflow" guide on the ML2 developer documentation but I can't seem to figure out the issue.
How to enable a build variant for ML2 on android studio?
Tried calling a function in the android x86_64 plugin to add 2 number (passed in as 2 arguments) and return the result. Its only returns the first operand as the result. Seemed like a calling convention issue to me. Tried with calling conventions Cdecl, StdCall, ThisCall, FastCall through Unity. All had the same result. The android plugin package (.so) is configured as x86_64 executable in Unity.
Here is the snapshot of my current config:
ML2 OS version: Build: B3E.221020.13-R.039
MLSDK version: SDK Version 29
Host OS: Windows 10
Common Packages
C API Samples: 1.1.0-dev2
ML C SDK: 1.1.0-dev2
ML C SDK CMake Support: 1.0.6.0
ML OS: 1.1.0-dev2 (Secure)
Unity Packages
Unity Editor: 2022.2.0b14.112.4874
Unity Examples / package / Doc / App Sim: 1.1.0-dev1
Unity Soundfield Audio: 3.2.1-221024.37.0d182e6_1.1.0-dev1
Android Studio
Version: Chipmunk 2021.2.1 Patch 2
SDK Platform: Android 10.0(Q) / API level 29
SDK Build-Tools 33.0.1
NDK 25.0.8775105
SDK Command Line tools 8.0
CMake 3.22.1
Android Platform-Tools 33.0.3
Android SDK Tools 26.1.1
Magic Leap SDK (Tools) 1.0.6
Magic Leap SDK (v1.1.0-dev2)
*** ML2 Addon was added to SDK Update sites ***
*** Command line options in Settings->Build,Exec, Deployment->Compiler was set to :
-Proot_path=C:\Users\robot\MagicLeap\mlsdk\v1.1.0-dev2