Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

Resolved Black Screen-Unity AR Camera not Working

Discussion in 'AR' started by jrd299, Jun 5, 2020.

Thread Status:
Not open for further replies.
  1. jrd299

    jrd299

    Joined:
    Feb 9, 2020
    Posts:
    1
    Hi everyone,

    I am new to Unity and I was following a tutorial online: Getting Started with ARFoundation in Unity on Youtube. I am using Unity 2019.3.9.f1 and have downloaded the following packages:

    AR Foundation

    ARCore XR Plugin

    ARKit XR Plugin

    I tried building and testing to an Android phone (Samsung Galaxy S4) but the screen just turned up black (this changed as I altered the color of the background on the AR camera). The unity logo popped up before it but there was no prompt to ask for camera permission. To test if this was just a phone problem, I downloaded an AR app from Playstore and that seemed to work. Multi-threaded Rendering is off, ARCore is switched to optional. I'm not sure what's wrong.

    Could you guys help me out? Thanks! Let me know if more info is needed.
     
  2. CindyG

    CindyG

    Joined:
    Mar 29, 2019
    Posts:
    9
    Have you enable ARCore in XR Setting?
     

    Attached Files:

  3. vedantgirkar32

    vedantgirkar32

    Joined:
    May 28, 2020
    Posts:
    10
    Even I'm facing the same problem. Yes I have enabled and tried the XRCore option. And now the option to grant the permission to enable the camera in android also doesn't pop up.
    I have tried with 2 different phones but nothing seems to work.
     
  4. cgtinker

    cgtinker

    Joined:
    May 6, 2019
    Posts:
    8
    Zynischer likes this.
  5. ManjitSBedi

    ManjitSBedi

    Joined:
    Mar 8, 2014
    Posts:
    58
  6. henryqng

    henryqng

    Joined:
    Jan 17, 2017
    Posts:
    8
    Thanks to ManjitSBedi's help. I had the same issue but for iOS. I just needed to tick the checkbox for ARKit for Initialize XR on Startup and that fixed it.
     
    Jerry-Zhao and darkobilandzic like this.
  7. NatalieW15

    NatalieW15

    Joined:
    Jul 30, 2019
    Posts:
    16
    SateyrOfficial likes this.
  8. awwadawwad803

    awwadawwad803

    Joined:
    Apr 7, 2017
    Posts:
    2
    Thank you that is working.
     
  9. Nob3L

    Nob3L

    Joined:
    Mar 31, 2021
    Posts:
    1
    Try Installing ARCore SDK instead of ARCore XR plugin and after that select the android SDK path manually. Also, use ONLY ARCore Supported Device

    Thank Me later!!!!
     
  10. unity_N9OQPczJpD64_g

    unity_N9OQPczJpD64_g

    Joined:
    Feb 7, 2021
    Posts:
    1
    Thank you so much!!
     
  11. AVSimo

    AVSimo

    Joined:
    Mar 28, 2021
    Posts:
    1
    I'm still having the issue even after going through everything. I'm on a MacBook Air and I'm trying to test launch to an iPhone 12 X. any info to help would be great!! (This is what my camera looks like btw)
     

    Attached Files:

    psxss27 likes this.
  12. AnthonyJackson81

    AnthonyJackson81

    Joined:
    May 30, 2019
    Posts:
    32
    ARCore... and arfounation seems frustrating to me. I just bought a phone, so I could learn this stuff, found a reasonable affordable phone on the list..... it turns up, and using the git-hub demo scene Check_Support turns out the phone on the ArCore list is not actually of any use.

    Brill!!

    Am I missing something? Does the demo scene check is AR-Core is actually on the phone?
     
    raymond_aujc likes this.
  13. MicKre

    MicKre

    Joined:
    Feb 21, 2020
    Posts:
    2
    Installing ARCore SDK? How? You mean by installing Android Studio?

    This black screen issue is driving me nuts!
     
  14. AnthonyJackson81

    AnthonyJackson81

    Joined:
    May 30, 2019
    Posts:
    32
    I apparently, have a device which is Supported. It is listed on Google's list for ARCore.... and I have ticked the ARCore XR box :rolleyes:..... but apprently using 2020.3 and ARfoundation 4.0, but still using the demo scenes from the github repo it still says not compatible.

    Am I missing something? Hard to believe, ArCore phone, with Google Play services for AR is installed ( so I can assume the phone and android version is supported).

    My phone is : Xiaomi Redmi Note 9S ..... and is on the list.
     
    raymond_aujc likes this.
  15. KyryloKuzyk

    KyryloKuzyk

    Joined:
    Nov 4, 2013
    Posts:
    1,073
  16. AnthonyJackson81

    AnthonyJackson81

    Joined:
    May 30, 2019
    Posts:
    32
    Hey cheers. I did start here with the Simple AR and the Support Checker Scenes.... Its a brand new phone, with the sole purpose of using for Learning/Development of AR, I felt I did my homework on what models support ARCore.

    my phone is definitely on this list. https://developers.google.com/ar/devices

    I'll go over the repo and setup again tomorrow, but I felt like I spent a few hours going through all possible issues on Friday.

    Could it be ArFoundation are too 'new'. Is there a preferred version combo like ArFoundation 3.0 and 2019.x ?

    OR could it be the Manufacturers of the phone just not playing ball, despite Google Having tested it and listed it?
     
  17. KyryloKuzyk

    KyryloKuzyk

    Joined:
    Nov 4, 2013
    Posts:
    1,073
    The AR Foundation is stable and it's 100% safe to make production quality apps with it. But it requires some experience to set up.
    Each Unity version has its own 'verified' AR Foundation version. For example, for Unity 2019.4.24 the verified AR Foundation version is 2.1.18.
     
    AnthonyJackson81 likes this.
  18. AnthonyJackson81

    AnthonyJackson81

    Joined:
    May 30, 2019
    Posts:
    32
    Thank you. I thought that might be the case. Is it documented anywhere? or is it a case of trial and error?

    Edit : I Looked through the docs and matched my Unity Version to the AR-Foundation, AR-Core verions. Still no luck. 150quid on a new phone, ouch...thinking although my phone is on the google list... its not quite 100% true.

    I feel like Im ok with setting this stuff up, I have been working on a coupe of XR (VR Oculus) projects from scratch, there seems to be some overlap in the packages used.

    I was trying to use 2020.3 LTS. With Foundation 4.2.0
     
    Last edited: Apr 19, 2021
    raymond_aujc likes this.
  19. AnthonyJackson81

    AnthonyJackson81

    Joined:
    May 30, 2019
    Posts:
    32
    Ok, So if I build an Run I can get there, which is some progress.

    However, Unity Remote fails/black screen. Interesting.
     
  20. KyryloKuzyk

    KyryloKuzyk

    Joined:
    Nov 4, 2013
    Posts:
    1,073
    Unity Remote app doesn't support AR Foundation.
     
  21. AnthonyJackson81

    AnthonyJackson81

    Joined:
    May 30, 2019
    Posts:
    32
    Thank you! I just came across a previous post from yourself and saw this is the case.

    Its not great but at least I can work through some basics now and begin, albeit with longer iteration times than Im used to.

    Thanks for your input/patience. Your comment about version got me looking a bit deeper into matching up Unity Version with the correct ARFoundation.

    Cheers!!!
     
    KyryloKuzyk likes this.
  22. AnthonyJackson81

    AnthonyJackson81

    Joined:
    May 30, 2019
    Posts:
    32
    Morning 2 of my AR learning..... I already feel like KirillKuzyk, you plugin is going to give me back some years. Building and Running to even understand the ARFoundation samples, is a pain no? Looks like your plugin is a lifesave.
     
    KyryloKuzyk likes this.
  23. xjorma

    xjorma

    Joined:
    Apr 21, 2020
    Posts:
    1
    If you are using URP watch this. It was my issue.
     
  24. ahmedaniss

    ahmedaniss

    Joined:
    Sep 18, 2019
    Posts:
    98
    Problem fixed here :
     
    Sir314 likes this.
  25. John1515

    John1515

    Joined:
    Nov 29, 2012
    Posts:
    248
    When using URP, make sure to add the "AR Background Render Feature" to the render settings.
    So by default that would be the forward renderer. Find the "ForwardRenderer" scriptable object in your project and add the feature :)

    And of course make sure you deleted the standard main camera in your scene and have added AR Session and AR Session Origin from the menu GameObject > XR.

    Screenshot 2021-05-21 at 07.51.26.png
     
  26. uniteiro

    uniteiro

    Joined:
    Mar 11, 2014
    Posts:
    12
    THX a lot bro!
     
  27. murt30

    murt30

    Joined:
    Mar 2, 2015
    Posts:
    3
  28. darkobilandzic

    darkobilandzic

    Joined:
    Sep 14, 2021
    Posts:
    1
    This did the work for me. THX bro
     
  29. AJTiger

    AJTiger

    Joined:
    Jul 29, 2021
    Posts:
    4
    I am working on AR a app. I download a model from link and show in a AR view in app. Model download and show properly in editor but in build only eyes of model show. Model not show properly in Build android. I am using unit version 2020.3.15 and dlc (model) make in same version of unity. Help me asap.

    Thank you
     
  30. Lenvanthis012

    Lenvanthis012

    Joined:
    Aug 24, 2013
    Posts:
    21
    This solved my problem. Thanks a lot, JelmerV!
     
  31. AnahidE5

    AnahidE5

    Joined:
    Jan 10, 2022
    Posts:
    40
    I followed this video to fix my problem. But when I add the New ARE Background Renderer Feature to the Universal Render Pipeline Asset_Renderer, there is no ARBackgroundRendererFeature script attached to it. And also, I still have the black screen problem. Does anyone know why there is no script attached?
     
    SaadBaig likes this.
  32. KyryloKuzyk

    KyryloKuzyk

    Joined:
    Nov 4, 2013
    Posts:
    1,073
    https://forum.unity.com/threads/arf...k-screen-and-no-tracking.915527/#post-6374280
     
  33. AnahidE5

    AnahidE5

    Joined:
    Jan 10, 2022
    Posts:
    40
    Screenshot 2022-01-11 090423.png
    Thank you for your reply. I made sure to follow the steps in the post but the problem still remains. In this screenshot you can see that my URP renderer looks different and doesn't have the script.
     
  34. unity_r4og11-ZAfhYbQ

    unity_r4og11-ZAfhYbQ

    Joined:
    Dec 6, 2020
    Posts:
    1

    If any of the above did not work and if you are trying to do a production build then make sure minify options in publishing settings are unchecked....i dont know y but it worked for me
     
Thread Status:
Not open for further replies.