Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Latest AR Foundation Package fails with IL2CPP

Discussion in 'AR' started by dyuldashev, Aug 11, 2019.

  1. dyuldashev

    dyuldashev

    Joined:
    Mar 3, 2016
    Posts:
    76
    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:
    https://github.com/Unity-Technologies/arfoundation-samples
    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.
     
  2. wellsy

    wellsy

    Joined:
    Oct 10, 2018
    Posts:
    5
    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
     
  3. Flarup

    Flarup

    Joined:
    Jan 7, 2010
    Posts:
    164
    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
     
  4. Flarup

    Flarup

    Joined:
    Jan 7, 2010
    Posts:
    164
    Found a work-around for now, in order to get IL2CPP working on Android: Disiable "Strip Engine Code" under player settings.
     
  5. wellsy

    wellsy

    Joined:
    Oct 10, 2018
    Posts:
    5
    Thanks Flarup, will try on my project later today
     
  6. wellsy

    wellsy

    Joined:
    Oct 10, 2018
    Posts:
    5
  7. Flarup

    Flarup

    Joined:
    Jan 7, 2010
    Posts:
    164
    I also have "Allow unsafe code" checked. In addition to this I had to restart my Unity before it worked.
     
  8. wellsy

    wellsy

    Joined:
    Oct 10, 2018
    Posts:
    5
    Hmmm... still doesn't work for me. Tried a few more things as well but just can't get it to build
     
  9. Flarup

    Flarup

    Joined:
    Jan 7, 2010
    Posts:
    164
    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.
     
  10. wellsy

    wellsy

    Joined:
    Oct 10, 2018
    Posts:
    5
    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