Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

ARCore Camera texture stops updating yet tracking continues

Discussion in 'ARCore' started by LostInTheMachine, Apr 17, 2018.

  1. LostInTheMachine

    LostInTheMachine

    Joined:
    Aug 8, 2010
    Posts:
    48
    Hi
    I have an issue using Unity 2017.3.1p3 where the camera texture can sometimes stop updating - ie it freezes - and yet tracking still continues, so then the screen is no longer being cleared(as the Unity camera is Depth only clear) , which is obviously results in a bit of a mess.

    My app has to run on iOS and Android. I was using Vuforia's ground plane - only to my recent dismay finding out that ARcore was not being used yet, despite them claiming that it would be when ARcore reached 1.0. It's now 1.1! And so I've had to create an ARcore implementation. It's a relatively simple scenario that I could adapt the HelloAR example.

    This means that ARCore has to coexist with Vuforia in the same Unity project. Could this make a difference? Vuforia has this insane behaviour that their VuforiaBehaviour component is attached to your camera automatically - and this is even though ARCore is enabled, and Vuforia is disabled. Grrrr. Ugly code gymnastics are required to turn it off, but in that single frame where it was enabled, who knows if that would have caused issues for ARCore? I don't know if this is the cause - I'm just mentioning it as a possibility. Vuforia also has delayed initialisation enabled so in theory it shouldn't interfere (more than being an annoyance).

    What I can say is that it happens more frequently on the "older" phones like Google Pixel and Samsung S8. On Pixel 2 it's extremely rare.

    Given the black box nature of Unity all I can do is to trial and error change things around - but I've never been able to get rid of the issue.

    Has anyone else had this experience?

    Thanks
    Scott

    ARCore 1.1
    Unity 2017.3.1p3 (Vuforia version 7.0.47)

    PS what is the point of tags when I can't create my own and I'm given the option of "graphics,jobs,srp" - apart from "graphics" the rest are useless.