Content Authoring Problem with camera

  • Issue category: Content Authoring
  • Device type & OS version: Android 12
  • Host machine & OS version: Windows 10
  • Issue Environment : Unity Remote / Unity Mock / On Device / Dev Portal
  • ARDK version: 3.0 Beta
  • Unity version: 2021.3.25f1

Description of the issue:

Hi, I’m trying to make a project with Content Authoring for Android following all the steps in the documentation:
https://lightship.dev/docs/beta/ardk/how-to/real_world_location_ar/

But when previewing in Unity I get the error: “NullReferenceException: Object reference not set to an instance of an object”.

Even so, it is exported but on my Android the camera stays black and does not activate (I changed the color to check if it was a problem with my device). What am I doing wrong? I even give camera permissions from apps on my device but it doesn’t work.

Thank you so much.

Dont know about the first issue, but if the camera feed isn’t rendering to your screen it might be a compatibility problem (I assume it, is because your device doesn’t seem to be a basic Android phone but a tablet). Check compatibility here: ARCore supported devices  |  Google for Developers

Hi samuel! It does have Arcore, it’s the Lenovo Tab M10 Plus 3rd Gen which supports depth APIs, I looked at that to buy it.

Update, for some strange reason the project works if exported from a Mac.
Description of “the solution”: Have a friend send you the same project but made on Mac, change Build Settings to Android and export. In the Lightship 2.5 version the same thing happened to me with VPS and it was solved in the same way, I’m not sure why it happens, I think it has to do with the camera permissions in Android, I noticed that in the 3.0 beta there is no default a script that adds camera permissions like it was in 2.5. Still, when bringing a project from Mac to Windows this is not necessary.

Hello Trazendente,

Can you provide the make and model of the tablet? Please do note that officially we don’t support tablets even if they do support ARCore but it’s interesting that it did build and work on a Mac but not on a Windows machine. You wouldn’t happen to have an Android phone on hand to test if you get the same result on a phone?

As for 3.0 not having Android permission requests, this should be handled by Unity now that ARDK and ARFoundations have been integrated together. I myself have been using ARDK 3 and have been getting prompted for permission to the Camera despite not having an actual request script in the project like with ARDK 2.5.

For the Windows machine, can you also double check that you’ve selected Niantic Lightship SDK under Edit → Project Settings → XR Plug In Management → Plugin Providers. Make sure only Lightship is checked. All other providers should be unchecked.

Lastly, since the error being thrown is a null reference exception, can you just double check that the Location Manager has all its fields filled in for its components? The simplest way to check would be to look through the How To we have provided here: How to Place Content in Real-World Locations Using Location AR | Niantic Lightship