Search Unity

Switching from AR-Scene to non-AR-scene back to AR-scene results in black background

Discussion in 'AR' started by ziemlich3D, Aug 22, 2019.

  1. ziemlich3D

    ziemlich3D

    Joined:
    Aug 21, 2017
    Posts:
    24
    Hi everyone,

    I discovered a "new problem" in my current project. The first release, made with Unity 2019.1.11f1, ARFoundation 2.2.0 prev2, ARCore 2.1.0 prev5 worked like a charm.
    Now for the next iteration of the project I had to update the project to Unity 2019.2.1.f1 with ARFoundation 2.2.0 prev3 and ARCore 2.1.1 but now discovered a problem, which wasn't there in my first version: If the user enters the AR-scene at the first time all works fine. Then he leaves to another non-AR-scene (in my case the main menu) and re-enters the AR-scene (by loading it), then the AR-tracking seems to work as desired and also feature-points and planes are being visualized, but the webcam-texture is not shown, so the background is black only.
    How can I fix this problem? Is there a way to reinitialize the webcam-texture? The Logcat doesn't show any nullpointers etc., so everything "works fine". I didn't do any change to this part of the project, components etc. just updated the above mentioned packages using the package-manager.

    TL;DR: AR-scene -> normal scene -> AR-scene with black background

    Any help will be appreaciated :)
     
  2. azanoni

    azanoni

    Joined:
    Jul 30, 2019
    Posts:
    3
    I have the same issue using Arkit3, I Think that is a issue relate to the AR Session we need to destroy or reset but I dont know how...
     
  3. ziemlich3D

    ziemlich3D

    Joined:
    Aug 21, 2017
    Posts:
    24
    There is a functionality in my AR-scene to reset the complete AR-session calling the Reset() method of the ARSession-component. Unfortunately this doesn't fix the problem with the black screen :(
     
  4. ziemlich3D

    ziemlich3D

    Joined:
    Aug 21, 2017
    Posts:
    24