Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Black Screen #2

Open
nems808 opened this issue Jun 18, 2018 · 67 comments

Comments

Projects
None yet
@nems808
Copy link

commented Jun 18, 2018

Unity 2018.1.5f
I have built and ran the demo scene with a cube successfully before. Now, the build is only showing a black screen and the camera permission is never raised when starting the build for the first time. Does anyone have any ideas what might have changed?

Using Pixel XL, ARCore 1.3.180604066

@ghost

This comment has been minimized.

Copy link

commented Jun 19, 2018

Could you share the logcat output when you run the app? Anything stand out as unusual?

@nems808

This comment has been minimized.

Copy link
Author

commented Jun 19, 2018

I added Mapbox and by accident, I added their ARCore package. Removing it solved the problem.

@kennethlng

This comment has been minimized.

Copy link

commented Jun 30, 2018

In case anybody's still getting a black screen when opening the app, you have to add a Camera Usage Description in Player settings.

Using iPhone X

@renaudbedard

This comment has been minimized.

Copy link

commented Jul 10, 2018

I'm getting a black/dark grey screen running the sample as-is on Android also.
The app got past the Unity splash screen but did not ask for Camera permission.

Unity 2018.2.0f2
ARCore XR Plugin 1.0.0-preview.17
AR Foundation 1.0.0-preview.13
Pixel 2 XL running Android 8.1
ARCore 1.3.180604066

I get these warnings in my Unity Console, I tried flushing the package cache, reinstalling the packages, but they keep showing up. Possibly related?

2018-07-10 15_56_23-

logcat excerpts :

07-10 15:49:30.883 1502-1579/com.example.arfoundationsample D/Unity: [VFS] Mount /data/app/com.example.arfoundationsample-3vYJGZ261B_PNlopl_wfqg==/base.apk
07-10 15:49:30.889 1502-1502/com.example.arfoundationsample I/TangoClientLibLoader: Pure Java path, not loading libtango_client_api.so at all.
07-10 15:49:30.890 1502-1502/com.example.arfoundationsample E/Tango: Java version of Tango Service not found, falling back to tangoservice_d.
07-10 15:49:30.891 1502-1502/com.example.arfoundationsample E/zygote: No implementation found for int com.google.atap.tango.TangoJNINative.Initialize(android.content.Context) (tried Java_com_google_atap_tango_TangoJNINative_Initialize and Java_com_google_atap_tango_TangoJNINative_Initialize__Landroid_content_Context_2)
07-10 15:49:30.891 1502-1502/com.example.arfoundationsample E/Unity: Error trying to call delegated method resume. null

07-10 15:49:30.995 1502-1579/com.example.arfoundationsample D/Unity: Unable to lookup library path for 'unitygar', native render plugin support disabled.
07-10 15:49:30.996 1502-1579/com.example.arfoundationsample E/Unity: Unable to find unitygar

07-10 15:49:33.732 1502-1579/com.example.arfoundationsample A/tango: jni_helper.cc:19 'vm' Must be non NULL
07-10 15:49:33.732 1502-1579/com.example.arfoundationsample E/CRASH: signal 6 (SIGABRT), code -6 (?), fault addr --------
    *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    Build fingerprint: 'google/taimen/taimen:8.1.0/OPM2.171026.006.C1/4769658:user/release-keys'
    Revision: 'rev_10'
    pid: 1502, tid: 1579, name: UnityMain  >>> com.example.arfoundationsample <<<
        r0 00000000  r1 0000062b  r2 00000006  r3 00000008
        r4 000005de  r5 0000062b  r6 cc3fd59c  r7 0000010c
        r8 00000000  r9 cc3fd9f4  sl 0000018d  fp 00000000
        ip 00000000  sp cc3fd588  lr e7dfbc89  pc e7df5772  cpsr cc3fd218
    backtrace:
07-10 15:49:33.736 1502-1635/com.example.arfoundationsample D/NetworkSecurityConfig: No Network Security Config specified, using platform default
07-10 15:49:33.855 1502-1579/com.example.arfoundationsample E/CRASH: 	#00  pc 0001a772  /system/lib/libc.so (abort+63)
    	#01  pc 0000655d  /system/lib/liblog.so (__android_log_assert+156)
    	#02  pc 00009d1d  /data/app/com.example.arfoundationsample-3vYJGZ261B_PNlopl_wfqg==/lib/arm/libtango_client_api2.so
    	#03  il ........  at (wrapper managed-to-native) UnityEngine.XR.Tango.TangoInputTracking.Internal_TryGetPoseAtTime (double,UnityEngine.ScreenOrientation,UnityEngine.XR.Tango.CoordinateFrame,UnityEngine.XR.Tango.CoordinateFrame,UnityEngine.XR.Tango.PoseData&) <IL 0x00026, 0xffffffff>
    	#04  il 00000064  at UnityEngine.XR.Tango.TangoInputTracking.TryGetPoseAtTime (UnityEngine.XR.Tango.PoseData&,UnityEngine.XR.Tango.CoordinateFrame,UnityEngine.XR.Tango.CoordinateFrame,double) [0x00015] in /Users/builduser/buildslave/unity/build/Runtime/AR/Tango/ScriptBindings/Tango.bindings.cs:306
    	#05  il 00000053  at UnityEngine.SpatialTracking.PoseDataSource.TryGetTangoPose (UnityEngine.XR.Tango.CoordinateFrame,UnityEngine.Pose&) [0x00012] in C:\buildslave\unity\build\Extensions\UnitySpatialTracking\Runtime\TrackedPoseDriver.cs:149
    	#06  il 000000fb  at UnityEngine.SpatialTracking.PoseDataSource.TryGetDataFromSource (UnityEngine.SpatialTracking.TrackedPoseDriver/TrackedPose,UnityEngine.Pose&) [0x0009d] in C:\buildslave\unity\build\Extensions\UnitySpatialTracking\Runtime\TrackedPoseDriver.cs:122
    	#07  il 00000067  at UnityEngine.SpatialTracking.TrackedPoseDriver.TryGetPoseData (UnityEngine.SpatialTracking.TrackedPoseDriver/DeviceType,UnityEngine.SpatialTracking.TrackedPoseDriver/TrackedPose,UnityEngine.Pose&) [0x00027] in C:\buildslave\unity\build\Extensions\UnitySpatialTracking\Runtime\TrackedPoseDriver.cs:248
07-10 15:49:33.856 1502-1579/com.example.arfoundationsample E/CRASH: 	#08  il 0000006f  at UnityEngine.SpatialTracking.TrackedPoseDriver.PerformUpdate () [0x0002e] in C:\buildslave\unity\build\Extensions\UnitySpatialTracking\Runtime\TrackedPoseDriver.cs:412
    	#09  il 0000003b  at UnityEngine.SpatialTracking.TrackedPoseDriver.FixedUpdate () [0x0001a] in C:\buildslave\unity\build\Extensions\UnitySpatialTracking\Runtime\TrackedPoseDriver.cs:351
    	#10  il 0000006b  at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) <IL 0x0001c, 0x0006b>
07-10 15:49:33.859 1502-1579/com.example.arfoundationsample E/CRASH: 	#00  pc 000225d3  /data/app/com.example.arfoundationsample-3vYJGZ261B_PNlopl_wfqg==/lib/arm/libmono.so
    	#01  pc 001f7bb8  /data/app/com.example.arfoundationsample-3vYJGZ261B_PNlopl_wfqg==/lib/arm/libmono.so (mono_runtime_invoke+136)
    	#02  pc 00fb72c4  /data/app/com.example.arfoundationsample-3vYJGZ261B_PNlopl_wfqg==/lib/arm/libunity.so (ScriptingInvocation::Invoke(ScriptingExceptionPtr*, bool)+84)
    	#03  pc 00dc5278  /data/app/com.example.arfoundationsample-3vYJGZ261B_PNlopl_wfqg==/lib/arm/libunity.so (MonoBehaviour::CallUpdateMethod(int)+284)
    	#04  pc 00a316f8  /data/app/com.example.arfoundationsample-3vYJGZ261B_PNlopl_wfqg==/lib/arm/libunity.so (void BaseBehaviourManager::CommonUpdate<FixedBehaviourManager>()+68)
    	#05  pc 00a316a0  /data/app/com.example.arfoundationsample-3vYJGZ261B_PNlopl_wfqg==/lib/arm/libunity.so (FixedBehaviourManager::Update()+32)
    	#06  pc 00d9a368  /data/app/com.example.arfoundationsample-3vYJGZ261B_PNlopl_wfqg==/lib/arm/libunity.so (InitPlayerLoopCallbacks()::FixedUpdateScriptRunBehaviourFixedUpdateRegistrator::Forward()+72)
    	#07  pc 00d9b0a4  /data/app/com.example.arfoundationsample-3vYJGZ261B_PNlopl_wfqg==/lib/arm/libunity.so (ExecutePlayerLoop(NativePlayerLoopSystem*)+96)
    	#08  pc 00d9b0f4  /data/app/com.example.arfoundationsample-3vYJGZ261B_PNlopl_wfqg==/lib/arm/libunity.so (ExecutePlayerLoop(NativePlayerLoopSystem*)+176)
    	#09  pc 00d9b29c  /data/app/com.example.arfoundationsample-3vYJGZ261B_PNlopl_wfqg==/lib/arm/libunity.so (PlayerLoop()+284)
    	#10  pc 0061b1f0  /data/app/com.example.arfoundationsample-3vYJGZ261B_PNlopl_wfqg==/lib/arm/libunity.so (UnityPlayerLoop()+572)
    	#11  pc 0061e934  /data/app/com.example.arfoundationsample-3vYJGZ261B_PNlopl_wfqg==/lib/arm/libunity.so (nativeRender(_JNIEnv*, _jobject*)+52)
    	#12  pc 0000836b  /data/app/com.example.arfoundationsample-3vYJGZ261B_PNlopl_wfqg==/oat/arm/base.odex (oatexec+17259)
    code around pc:
        e7df5750 21064630 f82ef062 46312002 f04f2200  0F.!b.... 1F."O.
        e7df5760 f0620800 4620f82f 22064629 7786f44f  ..b./. F)F."O..w
        e7df5770 f04fdf00 90035080 8004f8cd 1d38af01  ..O..P........8.
        e7df5780 f828f062 46392006 f062463a 2002f82b  b.(.. 9F:Fb.+.. 
        e7df5790 22004631 f816f062 46294620 f44f2206  1F."b... F)F."O.
        e7df57a0 df007786 f062207f 2300f825 b82af062  .w... b.%..#b.*.
        e7df57b0 c008f8df f8dc44fc 4760c000 00077988  .....D....`G.y..
        e7df57c0 4601460a 0063f06f f0622300 0000b823  .F.Fo.c..#b.#...
        e7df57d0 b082b580 4479490c 68096809 46699101  .....IyD.h.h..iF
        e7df57e0 f820f062 48092800 44789900 f04fbf08  b. ..(.H..xD..O.
        e7df57f0 680031ff 9a016800 d1021a80 b002ba08  .1.h.h..........
        e7df5800 f061bd80 bf00fe37 00076bfa 00076be6  ..a.7....k...k..
        e7df5810 b082b580 4479490c 68096809 46699101  .....IyD.h.h..iF
        e7df5820 f800f062 98004601 49082900 f04fbf08  b....F...).I..O.
        e7df5830 447930ff 68096809 1a899a01 b002d101  .0yD.h.h........
        e7df5840 f061bd80 bf00fe17 00076bba 00076b9e  ..a......k...k..
    code around lr:
        e7dfbc68 29002200 2202e9cd 6809d003 a9029102  .".)..."...h....
07-10 15:49:33.860 1502-1579/com.example.arfoundationsample E/CRASH:     e7dfbc78 2100e000 2200e9cd 2308466a fa86f05c  ...!..."jF.#\...
        e7dfbc88 d0043001 9800b10c 20006020 f04fe001  .0...... `. ..O.
        e7dfbc98 490630ff 68094479 9a056809 d1011a89  .0.IyD.h.h......
        e7dfbca8 bd10b006 fbe2f05b 00070770 00070734  ....[...p...4...
        e7dfbcb8 b0a1b5f0 48134606 460d466f 4614217c  .....F.HoF.F|!.F
        e7dfbcc8 68004478 90206800 f05c1d38 f04ffc27  xD.h.h .8.\.'.O.
        e7dfbcd8 900230ff f05b9500 9003fde9 f946f05c  .0....[.....\.F.
        e7dfbce8 0404e9cd 46294630 f05c463a 4906fc1f  ....0F)F:F\....I
        e7dfbcf8 68094479 9a206809 d1011a89 bdf0b021  yD.h.h .....!...
        e7dfbd08 fbb4f05b 00070708 000706d8 b082b510  [...............
        e7dfbd18 48114604 68004478 90016800 f05b4668  .F.HxD.h.h..hF[.
        e7dfbd28 3001fd55 4668d00b f05c4621 3001fa97  U..0..hF!F\....0
        e7dfbd38 4669d005 22002001 fd40f05b f04fe001  ..iF. ."[.@...O.
        e7dfbd48 490630ff 68094479 9a016809 d1011a89  .0.IyD.h.h......
        e7dfbd58 bd10b002 fb8af05b 000706b4 00070684  ....[...........
07-10 15:49:33.862 1502-1579/com.example.arfoundationsample E/MessageQueue: IdleHandler threw exception
    java.lang.Error: signal 6 (SIGABRT), code -6 (?), fault addr --------
    Build fingerprint: 'google/taimen/taimen:8.1.0/OPM2.171026.006.C1/4769658:user/release-keys'
    Revision: 'rev_10'
    pid: 1502, tid: 1579, name: UnityMain  >>> com.example.arfoundationsample <<<
        r0 00000000  r1 0000062b  r2 00000006  r3 00000008
        r4 000005de  r5 0000062b  r6 cc3fd59c  r7 0000010c
        r8 00000000  r9 cc3fd9f4  sl 0000018d  fp 00000000
        ip 00000000  sp cc3fd588  lr e7dfbc89  pc e7df5772  cpsr cc3fd218
    
        at libc.abort(abort:63)
        at liblog.__android_log_assert(__android_log_assert:156)
        at libtango_client_api2.00009d1d(Native Method)
        at TangoInputTracking.Internal_TryGetPoseAtTime(Native Method)
        at TangoInputTracking.TryGetPoseAtTime(Tango.bindings.cs:306)
        at PoseDataSource.TryGetTangoPose(TrackedPoseDriver.cs:149)
        at PoseDataSource.TryGetDataFromSource(TrackedPoseDriver.cs:122)
        at TrackedPoseDriver.TryGetPoseData(TrackedPoseDriver.cs:248)
        at TrackedPoseDriver.PerformUpdate(TrackedPoseDriver.cs:412)
        at TrackedPoseDriver.FixedUpdate(TrackedPoseDriver.cs:351)
        at Object.runtime_invoke_void__this__(Native Method)
        at libmono.000225d3(Native Method)
        at libmono.mono_runtime_invoke(mono_runtime_invoke:136)
        at libunity.ScriptingInvocation::Invoke(ScriptingExceptionPtr*, bool)(Invoke:84)
        at libunity.MonoBehaviour::CallUpdateMethod(int)(CallUpdateMethod:284)
        at libunity.void BaseBehaviourManager::CommonUpdate<FixedBehaviourManager>()(CommonUpdate:68)
        at libunity.FixedBehaviourManager::Update()(Update:32)
        at libunity.InitPlayerLoopCallbacks()::FixedUpdateScriptRunBehaviourFixedUpdateRegistrator::Forward()(InitPlayerLoopCallbacks:72)
        at libunity.ExecutePlayerLoop(NativePlayerLoopSystem*)(ExecutePlayerLoop:96)
        at libunity.ExecutePlayerLoop(NativePlayerLoopSystem*)(ExecutePlayerLoop:176)
        at libunity.PlayerLoop()(PlayerLoop:284)
        at libunity.UnityPlayerLoop()(UnityPlayerLoop:572)
        at libunity.nativeRender(_JNIEnv*, _jobject*)(nativeRender:52)
        at base.oatexec(oatexec:17259)```
@kennethlng

This comment has been minimized.

Copy link

commented Jul 10, 2018

I'm gonna guess it's the same issue. Did you try adding a Camera Usage Description? It's required when building out of Xcode (iOS) and I'm assuming it's the same case for Android.

Edit > Project Settings > Player > Other Settings > Camera Usage Description.

You can write in any random text.

@renaudbedard

This comment has been minimized.

Copy link

commented Jul 10, 2018

I figured it was the case, but no there is no Camera Usage Description field in the Player settings when building for Android.

@ghost

This comment has been minimized.

Copy link

commented Jul 10, 2018

@renaudbedard

This comment has been minimized.

Copy link

commented Jul 10, 2018

I am not, I just cloned the GitHub repository, ticked the "ARCore Supported" box in the XR Settings, added my ARCoreSettings for good measure, changed the app bundle ID and deployed.
The ARCore version I noted here is the redistributable that's installed on the phone (from the Play Store).

@ghost

This comment has been minimized.

Copy link

commented Jul 10, 2018

ticked the "ARCore Supported" box in the XR Settings

You should not tick this box (it's confusing, I know). In fact, there's a pre build verification step that shouldn't even let you deploy if you have checked this box -- not sure why it didn't get triggered. Try unchecking the box and see if that works for you.

@renaudbedard

This comment has been minimized.

Copy link

commented Jul 10, 2018

That was the problem! Thanks for the heads-up.
There definitely wasn't anything blocking me from deploying with that setting checked though.

@ghost

This comment has been minimized.

Copy link

commented Jul 11, 2018

The reason it doesn't stop you from deploying is due to a change in 2018.2 (the name of the "ARCore Supported" checkbox changed, so the code that checks whether it is ticked doesn't catch it). That will be fixed in the next ARCore XR Plugin update.

@ghost ghost added bug good first issue labels Jul 11, 2018

@albertoxamin

This comment has been minimized.

Copy link

commented Jul 27, 2018

I'm having the same issue when building for iOS even though I did set the Camera Usage Description and Requires ARKit Support

image

@ghost

This comment has been minimized.

Copy link

commented Jul 27, 2018

@albertoxamin Is this a new project or a clone of this samples repo? What device and Xcode version are you using?

@albertoxamin

This comment has been minimized.

Copy link

commented Jul 28, 2018

@timj-unity If I clone the repo the Camera Request appears but if I import it through the new package manager or if I simply drag and drop the files into an existing project the issue appears.
I am using Xcode 10 build 10L176w

@ghost

This comment has been minimized.

Copy link

commented Jul 28, 2018

When you say "drag and drop the files", do you mean you are only copying the assets folder? ARFoundation is delivered as a package, so you would also need to copy the Packages folder (specifically the manifest.json) or open the package manager window in your new project and install ARFoundation and ARKit. (Window > Package Manager)

@albertoxamin

This comment has been minimized.

Copy link

commented Jul 28, 2018

image
I did install it through the package manager but I copied the assets to access the sample scene in an existing project

@ghost

This comment has been minimized.

Copy link

commented Jul 29, 2018

Your screenshot shows you've only installed ARFoundation but not ARKit support. ARKit should be available from the "All" menu.

@albertoxamin

This comment has been minimized.

Copy link

commented Jul 29, 2018

That did fix it, thanks

@ufktvfk

This comment has been minimized.

Copy link

commented Jul 31, 2018

I am using Unity 2018.2 and Samsung S8. I have this exact black screen issue when I run the app. How can I fix this?

@ufktvfk

This comment has been minimized.

Copy link

commented Jul 31, 2018

I think I found the problem. I build the codes inside PlacedObjectFix brach and it worked. But inside this project I updated ARFoundation and ARCore. Then I got a building error saying that:

BuildFailedException: ARCore XR Plugin does not support x86. See Player Settings > Other Settings > Target Architectures.

UnityEditor.XR.ARCore.ARCorePreprocessBuild.EnsureTargetArchitecturesAreSupported () (at C:/Users/tevfik_demirbas/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.xr.arcore@1.0.0-preview.18/Editor/ARCoreBuildProcessor.cs:34)
UnityEditor.XR.ARCore.ARCorePreprocessBuild.OnPreprocessBuild (UnityEditor.Build.Reporting.BuildReport report) (at C:/Users/tevfik_demirbas/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.xr.arcore@1.0.0-preview.18/Editor/ARCoreBuildProcessor.cs:25)
UnityEditor.Build.BuildPipelineInterfaces+c__AnonStorey0.<>m__1 (IPreprocessBuildWithReport bpp) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildPipelineInterfaces.cs:376)
UnityEditor.Build.BuildPipelineInterfaces.InvokeCallbackInterfacesPair[IPreprocessBuild,IPreprocessBuildWithReport] (System.Collections.Generic.List1 oneInterfaces, System.Action1 invocationOne, System.Collections.Generic.List1 twoInterfaces, System.Action1 invocationTwo, Boolean exitOnFailure) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildPipelineInterfaces.cs:356)
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()###

Then, I unchecked x86 in Player Settings. After I build, black screen issue showed up again.

@ghost

This comment has been minimized.

Copy link

commented Jul 31, 2018

@ufktvfk You should not use the PlacedObjectFix branch (I've removed it now), and ARCore is not supported on x86 Android phones, so the build error is correct in that case.

Are you git clone'ing this repo and running it without modification, or are you trying to copy it into an existing project?

@ufktvfk

This comment has been minimized.

Copy link

commented Aug 3, 2018

I downloaded this project as zip file and then open it via Unity(2018.1.5f). When I build to my phone(Samsung S8), it compiles but didnt ask for camera permission. It is just a black screen. When I go for app settings, I see that camepare permission is not given. I gave this poermsssion manually and open the app again. But this same black screen issue continues.

@ufktvfk

This comment has been minimized.

Copy link

commented Aug 17, 2018

My issue still exists. When I deploy the app to my Android device ( Samsung S8), I got a black screen. I am trying to update my Udemy course with AR Foundation so this problem is really critical for me.

@ufktvfk

This comment has been minimized.

Copy link

commented Aug 17, 2018

Maybe it is realted to only my phone. Is there any possiblity that someone can try with S8?

@ghost

This comment has been minimized.

Copy link

commented Aug 20, 2018

@ufktvfk Same issue here but on a Pixel XL. Cloned repo and I only get the camera background colour. Compiles and deploys without asking for camera permission. As in your case manually adding camera permission does nothing.

@tdmowrer

This comment has been minimized.

Copy link
Collaborator

commented Aug 20, 2018

@ufktvfk @Collision11 Are you sure you also have the ARCore XR Plugin from the package manager? That would explain why you don't get prompted for camera permission. And you've just cloned this repo without making any local changes?

We've tested on an S8 and Pixel XL and they both work as expected here.

@ghost

This comment has been minimized.

Copy link

commented Aug 20, 2018

@tdmowrer yes, both ARCore XR and Foundation plugins are in project. Straight up clone, build and run. Running 9.0 on the Pixel.

Edit: Enabled development build, deployed and was prompted for camera permissions. Functioned normally after this. Wiped from device, disabled dev build and redeployed attempting to recreate issue but once again prompted for permissions and functioned normally.

@tdmowrer

This comment has been minimized.

Copy link
Collaborator

commented Aug 21, 2018

@Collision11 Anything interesting from adb logcat?
adb logcat Unity:* Unity-ARCore:* ArPresto:* *:S

@mobiius

This comment has been minimized.

Copy link

commented Sep 6, 2018

Just to add to my above comment, I have another project which uses AR Foundation and it runs perfectly fine on my S8. I rolled back the component versions in my new project to match what works in my other project, (AR Foundation 1.0.0-preview-12, ARCore 1.0.0-preview-16, and ARKit 1.0.0-preview-11) and it still doesn't work in my new project.
I thought it could be due to the scriptable render pipeline, but in the image that Collision11 posted above, they don't seem to be using it.

@tdmowrer

This comment has been minimized.

Copy link
Collaborator

commented Sep 6, 2018

@mobiius ARFoundation will not render the camera background when using the lightweight render pipeline (LWRP), so that is almost certainly your issue. We are working on LWRP compatibility, and it should be supported in the next ARFoundation release.

@mobiius

This comment has been minimized.

Copy link

commented Sep 6, 2018

What about the HDRP or should I switch back to the normal shaders?
Will ARFoundation be updated quickly enough that I can keep things as they are in the mean time?

@tdmowrer

This comment has been minimized.

Copy link
Collaborator

commented Sep 6, 2018

@ufktvfk Is your S8 from China? According to Google's supported device list, only two manufacturers are supported in China (Xiaomi & Huawei), and I believe the Huawei P20 requires you to manually install ARCore from the Huawei Apps Gallery.

The "am I supported" check in ARFoundation requires a connection to the Play Store if ARCore is not already installed on the device, which does not work in China if I understand correctly.

@tdmowrer

This comment has been minimized.

Copy link
Collaborator

commented Sep 6, 2018

@mobiius

What about the HDRP or should I switch back to the normal shaders?

None of the scriptable render pipelines currently work with ARFoundation, only the legacy pipeline.

@mobiius

This comment has been minimized.

Copy link

commented Sep 6, 2018

Will ARFoundation be updated quickly enough that I can keep things as they are in the mean time?
Are we talking days, weeks or months?

Thanks for the help so far BTW. :)

@tdmowrer

This comment has been minimized.

Copy link
Collaborator

commented Sep 6, 2018

Will ARFoundation be updated quickly enough that I can keep things as they are in the mean time?
Are we talking days, weeks or months?

Our release cycle is completely decoupled from the rest of Unity, and I believe LWRP support is being QA'd, so it should be within a couple weeks I would say.

Thanks for the help so far BTW. :)

You're welcome! Thanks for being an early adopter :)

@mobiius

This comment has been minimized.

Copy link

commented Sep 6, 2018

should be within a couple weeks

Good to know, thanks. :)

@mobiius

This comment has been minimized.

Copy link

commented Sep 6, 2018

Oh, I now have a working scene, I just removed the LWRP profile from the Scriptable Render Pipeline Settings option and the camera now renders. When the fix has been implemented, i'll re-add the profile. :)

@nathansisler

This comment has been minimized.

Copy link

commented Sep 18, 2018

I was getting the black screen on Pixels and just rolled back my AR Foundation package to preview 14 and ARCore XR plugin to preview 16. Working now

@beachgrub

This comment has been minimized.

Copy link

commented Sep 28, 2018

I have run into related problem where I have setup with ARCore preview 17 and foundation preview 13. I have also tried latest. If we export directly the APK, we get all the correct permissions. but our build machine does an Android Gradle build and it ends up with black screen. This is because it is missing several permissions in manifest:
"uses-permission
android:name="android.permission.CAMERA" />

uses-feature
android:name="android.hardware.camera.ar"
android:required="true" /
meta-data
android:name="com.google.ar.core"
android:value="required" /"

I notice in the log we get an error about Manifest on gradle build:

DirectoryNotFoundException: Could not find a part of the path "..\UnityProject\Builds\GeneratedApkTemp\src\main\AndroidManifest.xml". System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32

This is because it is missing the project name in the path. It should be GeneratedApkTemp/PROJECTNAME/src.

This looks like the problem file:
UnityEditor.XR.ARCore.ARCoreManifest.OnPostGenerateGradleAndroidProject or before that.

@beachgrub

This comment has been minimized.

Copy link

commented Sep 28, 2018

I found the issue. It is a bug in the ARCoreBuildProcessor.cs
#50

@jelmer3000

This comment has been minimized.

Copy link

commented Oct 28, 2018

I have the same issue.
ARFoundation preview19
ARCore preview 21
on a Samsung S8.

@ade-adisa

This comment has been minimized.

Copy link

commented Nov 7, 2018

Here's the fix, Just go to Edit > Project Settings > Player > XR Settings > Check 'ARCore Supported'.

@tdmowrer

This comment has been minimized.

Copy link
Collaborator

commented Nov 7, 2018

Here's the fix, Just go to Edit > Project Settings > Player > XR Settings > Check 'ARCore Supported'.

Please do not do that. That will break the com.unity.xr.arcore package. That is an older setting to support Google's ARCore Plugin.

This is a bug with the paths that Unity reports during certain types of builds. It is fixed in 2018.3.0a7.

@ade-adisa

This comment has been minimized.

Copy link

commented Nov 8, 2018

Here's the fix, Just go to Edit > Project Settings > Player > XR Settings > Check 'ARCore Supported'.

Please do not do that. That will break the com.unity.xr.arcore package. That is an older setting to support Google's ARCore Plugin.

This is a bug with the paths that Unity reports during certain types of builds. It is fixed in 2018.3.0a7.

Not True. It works perfect. My suggestion is Google's position as at September 27, 2018. https://developers.google.com/ar/develop/unity/quickstart-android

@tdmowrer

This comment has been minimized.

Copy link
Collaborator

commented Nov 8, 2018

@adisain Are you using Google's ARCore plugin for Unity? That is different from the one being discussed here (the package provided by Unity, available through Window > Package Manager). There is a check in this package that explicitly prevents you from building the Player if you check "ARCore Supported".

@weblings

This comment has been minimized.

Copy link

commented Jan 19, 2019

I found removing ARCore from the Package Manager and then adding it back made the built app ask me for camera permissions suddenly. Hopefully that works for anyone else having this issue

tdmowrer added a commit that referenced this issue Jan 31, 2019

Merge pull request #2 from timm/scale
Add a sample demonstrating scale
@vitcozzolino

This comment has been minimized.

Copy link

commented Feb 2, 2019

I have the same problem with Unity version 2018.3 and Google Pixel. I have a scene with just AR Session and AR Session Origin, build and run without issues but the screen stays black and the app never asks for permission to access the camera.

I checked the generated manifest and indeed there is nothing about camera permissions. If I run the Google ARCore examples, everything works fine.

@prayash

This comment has been minimized.

Copy link

commented Feb 15, 2019

Make sure that when Unity is exporting the .apk, your Android sdk folder has the version that it needs. I kept getting the black screen because of what seemed like tooling mismatch. Once I deleted the old ones that it was conflicting it, I kept the 28.0.3 folder only and then exported my as an APK. It finally worked after hours of struggling.

@woelfle2004

This comment has been minimized.

Copy link

commented Mar 29, 2019

The guys who are experiencing problems, that the app never ask for camera permission should check if they have the file "unityandroidpermissions.aar" in their Unity Project Folder. For some reason this file can be lost. Go to a working Project Folder, copy that aar-file into your Project folder path and then the app should ask for camera permission.

@watermelon-xi

This comment has been minimized.

Copy link

commented Apr 10, 2019

Whatever I do, it's always going to be black screen on my device, and there's no error, is it because my machine is not on the list of devices that ARCore supports?

@derekdominoes

This comment has been minimized.

Copy link

commented Apr 17, 2019

woelfle2004 - thank you very much. This fixed the problem for me also. Not sure if it is a Google or Unity issues. But it would be great if either could check into why this file isn't get included. I was using Unity 2019.1.02f following the exact steps described https://developers.google.com/ar/develop/unity/quickstart-android

@demanzonderjas

This comment has been minimized.

Copy link

commented Apr 29, 2019

Using the ARkit/ARcore setup from the package manager instead of Unity ARkit latest package / Google's version, solved the issue for me

@chillywilson

This comment has been minimized.

Copy link

commented Jun 6, 2019

After updating unity I ran into this issue on my brand new samsung tab s4.

Removing and reinstalling all the ARcore/foundation/kit packages and remaking the ar session and ar session origin worked form me.

@pravinanimataar

This comment has been minimized.

Copy link

commented Jun 19, 2019

For those, who face Black Screen problem in Google VR and LWRP in unity 2019. Following thing worked for me.

  1. I used HelloVR Scene from Google VR SDK in untiy
  2. In Hierarchy, delete or disable GvrInstantPreviewMain GameObject.
    thats all.

todds-unity pushed a commit that referenced this issue Jun 20, 2019

Nishant Naveen GitHub Enterprise
Update FaceMesh scene to use a different face mesh material for faces (
…#2)

* Update FaceMesh scene to use a different face mesh material for detected faces
@JVNightRider

This comment has been minimized.

Copy link

commented Jul 11, 2019

Hello, I have the same black screen problem using

  • Unity 2019.1.2
  • Package ARFoundation 1.1.0 preview.6
  • ARCore XR Plugin 1.0.0 preview.17

When I compile using Scripting Backend 'Mono' it works perfectly, but when I change Scripting Backend to 'IL2CPP' and Target Architectures 'ARMv7' & 'ARM64', ARCore seems not working and Camera zone is a black screen. Can somebody help me?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.