Search Unity

ARCore launch takes too long on Android

Discussion in 'AR/VR (XR) Discussion' started by waganda, Aug 21, 2020.

  1. waganda

    waganda

    Joined:
    Jun 5, 2020
    Posts:
    1
    We're making a project with ARFoundation to use as SDK in our Android and iOS apps.
    In Android, an empty project that only includes ARFoundation and ARCore takes 2.2s on the first launch and 1.5s on subsequent launches. The Unity launch screen is disabled.

    After adding the scripts to load a prefab and including the AAR library files into our main Android app, the launch takes 4 seconds. We are unhappy with that launch time as it is a bad experience for users to have to wait 4 seconds before they see the AR content.

    What can we do to speed up that launch?

    There seem to be 2 problems:

    - Unity takes 1 extra second to load the scripts and Canvas objects, even after we removed the 3D model from the scene and turned it into a prefab.
    - Loading it from our main app takes 1s longer than loading it from an otherwise empty app.

    But even the first launch of an empty scene that only contains ARCore takes 2 seconds, which is the maximum launch time we were hoping for in total. Is that normal?

    Any ideas about speeding up the launch would be welcome.
     
  2. chankeiro

    chankeiro

    Joined:
    Oct 25, 2021
    Posts:
    11
    Hi @waganda. Did you manage to speed it up?
     
  3. jamesmillere

    jamesmillere

    Joined:
    Jan 17, 2023
    Posts:
    3
    Hi @waganda

    Setting the actual size of the image in the augmented image database speeds up the process a lot. While using the method addImage for the AugmentedImageDatabase use the one with three arguments:addImage(String name, Bitmap bitmap, float widthInMeters).
     
  4. ringedproposal

    ringedproposal

    Joined:
    Mar 7, 2023
    Posts:
    4
    The process can be sped up significantly by specifying the actual image size in the augmented image database. When calling the AugmentedImageDatabase addImage function