Search Unity

When returning to a scene with a tracked image the trackd image prefab is visible in front of camera

Discussion in 'AR/VR (XR) Discussion' started by Juxtaposed, Aug 6, 2020.

  1. Juxtaposed

    Juxtaposed

    Joined:
    Aug 23, 2015
    Posts:
    29
    I have a title menu scene. From that scene one can switch to a scene that has a tracked image. In that second scene it is possible to return to the title scene. Switching scenes is done using SceneManager.LoadSceneAsync(sceneIndex);

    So if I start tracking the image in the scene with the tracked image then return to the title menu then return to the scene with the tracked image the tracked image prefab is tied to right in front of the camera and covers the screen till I scan the tracked image at which point it remains with the tracked image.

    This behavior never occurs the first time entering the scene with the tracked image.

    My understanding was that everything was destroyed after a scene load... Or does certain ARFoundation components get put set to not be destroyed?

    What can be done to prevent this?