Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question AR Foundation Black Screen

Discussion in 'AR' started by nandhakumarnandu96, Nov 17, 2023.

  1. nandhakumarnandu96

    nandhakumarnandu96

    Joined:
    Jan 24, 2019
    Posts:
    10
    why the camera only opens after minimize and maximize the app. Otherwise it's show black screen only.
     
    makaka-org likes this.
  2. makaka-org

    makaka-org

    Joined:
    Dec 1, 2013
    Posts:
    973
    If you don't operate with camera permissions, then the very first launch of the AR scene will lead to a camera permission request without loading the camera stream (with any answer for the request).

    And with the 2nd, 3rd and so on launches you will see the camera stream in the case of granting the permission request in the 1st launch. User will not have a second try to answer the request during the app launch when Permission was Denied.

    ------------

    In my AR projects, I use Native Camera and my custom controller to operate with the camera permissions and cover any app launches to provide the enabling of the camera anyway before the start of the AR Scene.

    You can use Native Camera freely without my controller.

    I also use my controller for non-AR foundation Apps, e.g. for Google Cardboard XR Plugin related app with pseudo Mixed Reality — Screenshot below:

    unity-asset-ar-vr-mr-camera-google-xr-0.jpg

    ------------
     
    Last edited: Nov 18, 2023
  3. nandhakumarnandu96

    nandhakumarnandu96

    Joined:
    Jan 24, 2019
    Posts:
    10
    Thanks for your support.
     
    makaka-org likes this.
  4. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    956
    @nandhakumarnandu96 The issue you describe is most commonly associated with the Package Manager's AR Feature. If you have the AR Feature in your app, try removing it and re-adding each package to your project individually.
     
  5. nandhakumarnandu96

    nandhakumarnandu96

    Joined:
    Jan 24, 2019
    Posts:
    10
    Thanks, I'll try it