Search Unity

ARKitRemote no video on device [SOLVED! make sure you use Metal]

Discussion in 'AR' started by benbritten3000, Dec 8, 2018.

  1. benbritten3000

    benbritten3000

    Joined:
    Jan 16, 2015
    Posts:
    4
    Hello!

    I just pulled down the latest ARKit stuff and am just getting started. I am on Unity 2018.2.16f1.

    I got the ARKit Remote app built and deployed to my device, and then got it all connected up to the editor, and that all works fine. Tracking is fine, the video shows up in the editor.

    However, on device I only see green (not pure green, more dark than that). It goes from black while it is waiting for a connection to just solid green. I know the camera is working, and I have the right camera permissions because I can see the video in the editor, just not on device.

    Similarly if I build any of the ARKit example scenes down to device (like UnityARKitScene) they run fine on device, and the tracking is all there and I can see the objects, but the video background texture is just the dark green.

    I feel like I am missing something very simple somewhere, and I have been searching the forum and trying different things for two days now and I cannot for the life of me get the video stream to show up on device either in the remote app, or in any of the example scenes. (or figure out the right thing to search for if this has already been addressed somewhere)

    It was green from the very first build, and I have tried to re-download and rebuild it with a clean unity project etc. Always green.

    Any help would be greatly appreciated :)

    Cheers!
    Ben

    Attached is an image of the ARKit Remote app working fine in the editor, but showing green on the screen. Similarly when I run any of the ARKit examples on the device I see all the tracking markers and objects, but only the solid green where I should be seeing the live video.
    IMG_5479.png
     
  2. benbritten3000

    benbritten3000

    Joined:
    Jan 16, 2015
    Posts:
    4
    Right! As per usual, whenever I get lost enough to post to the forums, the very next thing I think of is the solution.

    So: for anyone else who comes along the problem here is that if you don;t have Metal set as the graphics API, then all the AR tracking and stuff works, but nothing gets rendered to the screen. Oddly the AR Camera is still working fine, as you can get the video feed from the ARKit Remote, but the methods used to get the Y and UV textures out and blitted to the command buffer do not seem to work at all if you are not using Metal.

    So! Somehow I had gotten the graphics API set to openGL, and everything 'worked' but no video. I changed it to Metal, and now everything works as expected :)

    Cheers!
    Ben
     
    luispedrofonseca likes this.