Camera stays black when running the game (In Editor and On Device)

Include the following details (edit as applicable):

  • Device type & OS version: iOS
  • Host machine & OS version: Mac M1 Ventura
  • Issue Environment : Unity Mock / On Device
  • Xcode version:
  • ARDK version: 2.5.2
  • Unity version: 2022.3

Description of the issue:

When I’m running my game in editor as well as on device, the background / view stays black. When I create a new scene with the lightship templates everything is working fine. What could be the issue?

Do you use URP? If so, did you set up URP correctly?

Also, use unity 2021.3
2022.3 does not work properly with ARDK 2.X.

Thanks for you response mate, yes I set up URP correctly. Currently I just created another scene inside the same project, used the lightship template for AR Placement and then copy pasted my components and everything works fine.

Hope to get this project finished and not receive this error again ^^

1 Like

Hello Tobias,

I’m glad you got everything working!

That’s interesting that it worked when you created another scene inside the same project…was that the only difference between your 2 attempts? Do you experience this issue only with the AR Template, or with others as well?

Please keep us posted and let us know if you run into this issue again so that we may dive deeper into what may be happening.

Also as Dylan mentioned, ARDK is officially supported on Unity 2020 LTS and Unity 2021 LTS, so we recommend using one of those versions for future projects to prevent any other potential issues.

Hi Stacy, yes exactly, same project , created a new scene, used the AR Placement template and then copied the most important components one by one.

Until now, everything works fine,

Hi Stacy, I encountered this error now twice more. I received this message:

Metal: Error creating pipeline state (Unlit/ARKitFrame): depthAttachmentPixelFormat is not valid and shader writes to depth

Maybe it has something to do with the issue. Still quite annoying to always create a new scene…

Hello Tobias,

Are you using any post processing volumes in your project? If so, could you please send a screenshot of them?

Also, could you please provide us with screenshots of your ARDK Urp Asset and ARDK Urp Asset Renderer? Thank you for your patience while we continue investigating this issue!

I didn’t but what I did was downgrading from 2022 LTS to 2021 LTS and now everything works. So that seemed to be the main issue

Update, seemingly it is not working anymore… I now have the issue that in Editor , everything is working but as soon as I deploy on device, the screen stays black. I do however have Meshing on and that works. so it seems like just the camera image is missing…

Any help would be highly appreciated I can’t continue working like this …

Here are videos showing what happens:

Hello Tobias,

Could you please clarify a few details so that we may better pinpoint where the issue may lie?

  1. Did you create your project with the 3D Mobile template and Unity 2021?
  2. Did you set up the camera permissions in your project’s Player settings and grant permission when the app loaded on your device?
  3. What device type and iOS are you using?
  4. Is this the same project that you posted in your original post?

I apologize for all the back and forth, but I appreciate your patience as we work towards a solution.

Hi Stacy,

  1. I am using the 3D URP template
  2. Yes
  3. iPhone 11 with iOS 16.6.1
  4. No it is a new project I’ve created since I had some other issues in my original project.

Hello Tobias,

Thank you for the clarification.

Would you be able to provide us with the steps you took to produce this issue? (Any templates, ARDK components, etc. that you implemented). Nothing is standing out in terms of your setup, so if we were able to reproduce the issue on our end, it would help us better investigate the issue.