Latest AR Foundation Package fails with IL2CPP

The latest AR Foundation Package does not work with IL2CPP on Unity 2019.2.

Steps:

  1. Download the AR Foundation Samples package through this link:
    GitHub - Unity-Technologies/arfoundation-samples: Example content for Unity projects based on AR Foundation
  2. Build Settings → Player Settings → Other Settings → Configuration(Scripting Backend):
    Change From Mono to IL2CPP. Select both ARMv7 and ARM64.
  3. Select Android App Bundle and Build.

And it fails. Let me know how we can address this issue. Thanks.

Hi,

I have the same problem using 2019.1.6f1 but this isn’t a new project. I’ve had it working for months but I’ve made some changes and gone to publish it to the Play store. Google now insists on the 64 bit version which I didn’t have before so have only just tried building using IL2CPP

Thanks

I have the same problem when building for Android. Using the latest ARFoundation preview package and Unity 2019.1.14. Works when using Mono as scripting backend, but not when using IL2CPP.

Kind regards,
Uffe Flarup

Found a work-around for now, in order to get IL2CPP working on Android: Disiable “Strip Engine Code” under player settings.

Thanks Flarup, will try on my project later today

Unfortunately unticking “Strip engine code” didn’t work for me. Here’s my player settings


I also have “Allow unsafe code” checked. In addition to this I had to restart my Unity before it worked.

Hmmm… still doesn’t work for me. Tried a few more things as well but just can’t get it to build

After upgrading to ARFoundation 3.0.0 preview and Unity 2019.2 I get Android build problems again. Disabled “strip engine code” didn’t help this time.

I’ve just updated to Unity 2019.2.12f1 and it has built successfully. I had also disabled “Strip engine code” and set the strip code level to High