unity-game-engine64-bitnativeandroid-unity-plugin

Why the Unity3D only can load 32-bit native plugin(.so) on android platform?


I built a native plugin (shared library, .so) for ARM64-v8 on android platform.

It works well with the plain android apps.

But, when the Unity3D loads it, I just got an error message with "... .so is 64-bit instead of 32-bit....".

I just tried to use il2cpp to build the 64-bit app with Unity3D, but it also doesn't work.

Does the Unity3D not support 64-bit native plugin on android platform?

Or

How can I use it, 64-bit native plugin on android platform?

Please let me get some idea.

Thanks.

Currently the tools what I use are as follow:

OS - Windows 10 64-bit

Unity3D (Editor?) - 5.5.03f Personal (64-bit)

AndroidNDK64 - android NDK r10e for il2cpp


Solution

  • Unity does not currently support 64-bit native plugins on Android. So you must use a 32-bit version. Notice the values for the "Architecture" option in the Player Settings for the Android target (in the Unity Editor). They are ARMv7 and x86, both 32-bit architectures.

    Unity could support 64-bit targets for Android at some point in the future, but I don't know of any current plans to do so.