Search Unity

Bug ScheduleAddImageJob() in MutableRuntimeReferenceImageLibrary class doesn't work correct on Android

Discussion in 'AR' started by Abruzzi, Sep 24, 2020.

  1. Abruzzi

    Abruzzi

    Joined:
    Feb 6, 2015
    Posts:
    44
    We use Unity 2019.4.9f1 with AR Foundation 4.1.0 preview.5 & .7
    We are making a dynamic tracked image library for AR Tracked Image based on Dynamic Library sample from ARFoundation. And there is a problem with size (width&height) of tracked image. No matter how large or small the image size value (image.width) we set to ScheduleAddImageJob(image.texture, image.name, image.width);. On Android, an object spawned on the image marker is constantly-statically incorrect: more than it should be. At the same time on iOS all works fine.

    As a result, we cannot fit the size of the object to the image marker on Android!

    It looks like in deeper in code set constant value for image size if it is Android system in ScheduleAddImageJob() function. <-This is just a guess :D

    Today workaround: after instantiating the object on image marker, we manually change the scale of object - but this leads to other problems.
     
  2. tdmowrer

    tdmowrer

    Joined:
    Apr 21, 2017
    Posts:
    605
    What does that mean exactly? It's in the wrong position? This may be related to this issue. See my comments there to see if that helps.

    Also note that, on Android, the physical width is an optional parameter; if you simply pass
    null
    instead, ARCore is pretty good at guessing the physical image dimensions, so you can try that as a test.