Search Unity

[ARFoundation] Adding tracked images works properly on iOS but not Android

Discussion in 'AR' started by jhocking-bundlar, Nov 29, 2019.

  1. jhocking-bundlar

    jhocking-bundlar

    Joined:
    Nov 12, 2019
    Posts:
    24
    As described in this other thread, I'm adding images to the tracking library and that's working fine on iOS. On Android it's exhibiting odd behavior where the added images aren't recognized initially, but do start working if I leave the scene and then reload it. There's a script that adds ARTrackedImageManager on Start, including adding the images to a MutableRuntimeReferenceImageLibrary.

    Does anyone know why this is happening, and how to get AR image tracking working on Android the first time?

    Currently my best guess is that the imgdb takes longer to be ready, so I'm thinking I should monitor that using GetPathForLibrary as described here:
    https://softwareproduction.eu/2019/...rreferenceimagelibrary-for-arcore-at-runtime/

    ---

    Note that I'm currently using preview 3 of 3.0, since that was the latest when I started working on this. I see that 3.1 is now available so I'm thinking of upgrading that to see if it helps, although I doubt it will.
     
  2. jhocking-bundlar

    jhocking-bundlar

    Joined:
    Nov 12, 2019
    Posts:
    24
    hm I just noticed something that may be related in the logcat. I see this OpenGL error the first time I load the scene, but not the second:

    OPENGL NATIVE PLUG-IN ERROR: GL_INVALID_ENUM: enum argument out of range
    (Filename: ./Runtime/GfxDevice/opengles/GfxDeviceGLES.cpp Line: 348)
     
  3. jhocking-bundlar

    jhocking-bundlar

    Joined:
    Nov 12, 2019
    Posts:
    24