Search Unity

Bug Black screen / No camera

Discussion in 'AR' started by SjoerdP, Apr 20, 2021.

  1. SjoerdP

    SjoerdP

    Joined:
    Apr 8, 2021
    Posts:
    6
    Hello,

    I had a working AR-application and wanted to add a login screen. So I made a new Scene for this login screen and made it switch to the other scene with the rest of my application using SceneManager.LoadScene(index).
    After switching I just saw my camera and the AR components dit not load. It was definitely switching scenes, I added a canvas with some text to confirm this. It just did not start the AR.
    Note: I am using an AR session origin and a session in both of my scenes, the one in the second (not login) scene has a lot more components, could the problem be that I can't do this?

    Trying to fix this issue I unchecked the ARCore under the Plug-in providers (see the image below).
    upload_2021-4-20_17-20-34.png
    Ofcourse this did not fix the issue and I checked the box again, but after doing this I don't even see my camera view anymore when using the app in the second scene, it is just a black screen.
    I am using ARCore and AR foundation version 4.0.12 and XR plugin management 4.0.1.
    My console does not give any errors.
    I have set the scripting backend to IL2CPP instead of mono, and checked ARM64.
    I think I am using normal 3D redering and not URP.

    EDIT: I just remembered that I had the issue where I could only see my camera and no AR components before. I just created a new project (did the setup for arfoundation) and moved my stuff in there and it worked fine again. Now the project is bigger and I really do not what to do that, because the problem could come back again.

    Could some one help me out?
    Sorry if you are missing information, I am new to this.

    Kind regards.