google-ar / arcore-unity-sdk

ARCore SDK for Unity
https://developers.google.com/ar
Other
1.4k stars 402 forks source link

Blue Screen HelloAR sample #716

Open Junah-Park opened 4 years ago

Junah-Park commented 4 years ago

SPECIFIC ISSUE ENCOUNTERED

I am getting a blank blue screen rather than the camera feed on my pixel 2 using the helloAR project through Unity. The apk would not build until I set the Camera Config filter in the inspector of the ARCore Device object. I've tried various options for the DefaultCameraConfigFilter settings but none seem to have an effect. The screen shows blue after starting and black dots will populate the screen. Occasionally I will see a surface detection grid. I have manually granted camera permissions 95145152_1491584374347978_8388917529703088128_n

VERSIONS USED

STEPS TO REPRODUCE THE ISSUE

1. 1. 1.

WORKAROUNDS (IF ANY)

ADDITIONAL COMMENTS

ryantang30 commented 4 years ago

Hi, I am also having the exact same issues running the HelloAR app with Pixel 3 XL. Like @Junah-Park , I also had to set the Camera Config filter. Camera permissions were granted when the app was first downloaded so no need for me to manually update permissions.

drawing

VERSIONS USED

To try to debug the issue, I ran the adb logcat command to check the logs when the app is running. The following errors keep printing in a loop whenever the app is running. (Added log text for search-ability, image for readability)

I am still a beginner to Unity and ARCore so I cannot decipher this. Hopefully someone more experienced can help! Thanks!

05-17 20:41:42.192 14946 14968 E Unity : 05-17 20:41:42.205 14946 14968 E Unity : NullReferenceException: Object reference not set to an instance of an object 05-17 20:41:42.205 14946 14968 E Unity : at GoogleARCore.Examples.Common.RawImageVideoPlayer.Update () [0x00024] in <6fab8c04021e4c4884e75c6b21c48b94>:0 05-17 20:41:42.205 14946 14968 E Unity : 05-17 20:41:42.205 14946 14968 E Unity : (Filename: <6fab8c04021e4c4884e75c6b21c48b94> Line: 0) 05-17 20:41:42.205 14946 14968 E Unity : 05-17 20:41:42.208 14946 14968 E Unity : NullReferenceException: Object reference not set to an instance of an object 05-17 20:41:42.208 14946 14968 E Unity : at GoogleARCore.Examples.Common.PlaneDiscoveryGuide._UpdateUI () [0x00016] in <6fab8c04021e4c4884e75c6b21c48b94>:0 05-17 20:41:42.208 14946 14968 E Unity : at GoogleARCore.Examples.Common.PlaneDiscoveryGuide.Update () [0x00006] in <6fab8c04021e4c4884e75c6b21c48b94>:0 05-17 20:41:42.208 14946 14968 E Unity : 05-17 20:41:42.208 14946 14968 E Unity : (Filename: <6fab8c04021e4c4884e75c6b21c48b94> Line: 0) 05-17 20:41:42.208 14946 14968 E Unity : 05-17 20:41:42.210 14946 14968 E Unity : NullReferenceException: Object reference not set to an instance of an object 05-17 20:41:42.210 14946 14968 E Unity : at GoogleARCore.ARCoreBackgroundRenderer._UpdateShaderVariables () [0x00008] in <6fab8c04021e4c4884e75c6b21c48b94>:0 05-17 20:41:42.210 14946 14968 E Unity : at GoogleARCore.ARCoreBackgroundRenderer.Update () [0x00018] in <6fab8c04021e4c4884e75c6b21c48b94>:0 05-17 20:41:42.210 14946 14968 E Unity : 05-17 20:41:42.210 14946 14968 E Unity : (Filename: <6fab8c04021e4c4884e75c6b21c48b94> Line: 0) 05-17 20:41:42.210 14946 14968 E Unity :

image

Junah-Park commented 4 years ago

@ryantang30 Hi Ryan, I ended up using the ARCore plugin included with unity and ARFoundation https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@2.2/manual/index.html You can find further tutorials online like on YouTube, though keep in mind many of them are quickly outdated so you should look in the comments for similar issues and know what version of Unity you're using.

xinyunh0929 commented 4 years ago

Hi @Junah-Park & @ryantang30

I tried the same Unity version and the ARCore Unity SDK mentioned in this bug. But the HelloAR sample works fine on my side. May you double check the configurations you used? Due to the fact that both of you used Unity 2019, don't forget to install package "XR Legacy Input Helper". If you could still see the blue screen, may you provide the screenshot of your configurations? I would be willing to help.