Code Monkey home page Code Monkey logo

Comments (92)

renaudbedard avatar renaudbedard commented on June 10, 2024 7

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

from arfoundation-samples.

 avatar commented on June 10, 2024 3

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

from arfoundation-samples.

kennethlng avatar kennethlng commented on June 10, 2024 2

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

from arfoundation-samples.

renaudbedard avatar renaudbedard commented on June 10, 2024 1

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. ."[[email protected].
        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)```

from arfoundation-samples.

 avatar commented on June 10, 2024 1

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.

from arfoundation-samples.

albertoxamin avatar albertoxamin commented on June 10, 2024 1

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

from arfoundation-samples.

albertoxamin avatar albertoxamin commented on June 10, 2024 1

That did fix it, thanks

from arfoundation-samples.

TevfikUfuk avatar TevfikUfuk commented on June 10, 2024 1

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.

from arfoundation-samples.

macklinb avatar macklinb commented on June 10, 2024 1

@zoidberg67 That looks similar to another issue I had that turned out to be related to code stripping on IL2CPP (see here).

As mentioned in that topic, you can forcibly include the entire Unity.XR.ARCore assembly by creating a link.xml in the Assets folder with the following contents:

<linker>
    <assembly fullname="Unity.XR.ARCore" ignoreIfMissing="1" preserve="all"/>
</linker

Unsure if this will also work for you, but it's worth a shot.

from arfoundation-samples.

zoidberg67 avatar zoidberg67 commented on June 10, 2024 1

Thanks macklinb that seems to have sorted it!

from arfoundation-samples.

 avatar commented on June 10, 2024

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

from arfoundation-samples.

nems808 avatar nems808 commented on June 10, 2024

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

from arfoundation-samples.

kennethlng avatar kennethlng commented on June 10, 2024

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.

from arfoundation-samples.

 avatar commented on June 10, 2024

from arfoundation-samples.

renaudbedard avatar renaudbedard commented on June 10, 2024

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).

from arfoundation-samples.

 avatar commented on June 10, 2024

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.

from arfoundation-samples.

renaudbedard avatar renaudbedard commented on June 10, 2024

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

from arfoundation-samples.

albertoxamin avatar albertoxamin commented on June 10, 2024

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

image

from arfoundation-samples.

 avatar commented on June 10, 2024

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

from arfoundation-samples.

albertoxamin avatar albertoxamin commented on June 10, 2024

@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

from arfoundation-samples.

 avatar commented on June 10, 2024

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)

from arfoundation-samples.

TevfikUfuk avatar TevfikUfuk commented on June 10, 2024

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?

from arfoundation-samples.

TevfikUfuk avatar TevfikUfuk commented on June 10, 2024

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/[email protected]/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/[email protected]/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.

from arfoundation-samples.

 avatar commented on June 10, 2024

@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?

from arfoundation-samples.

TevfikUfuk avatar TevfikUfuk commented on June 10, 2024

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.

from arfoundation-samples.

TevfikUfuk avatar TevfikUfuk commented on June 10, 2024

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

from arfoundation-samples.

 avatar commented on June 10, 2024

@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.

from arfoundation-samples.

tdmowrer avatar tdmowrer commented on June 10, 2024

@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.

from arfoundation-samples.

 avatar commented on June 10, 2024

@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.

from arfoundation-samples.

tdmowrer avatar tdmowrer commented on June 10, 2024

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

from arfoundation-samples.

 avatar commented on June 10, 2024

@tdmowrer Yeah this is something on my end, tried to build out on desktop just now and same issue. Built out on laptop last night and was ok (but was interesting I had to enable dev build, first build didn't work).

logcat

08-21 17:29:56.946 14916 14934 E Unity   : Unable to find UnityARCore
08-21 17:29:57.082 14916 14934 E Unity   : DllNotFoundException: UnityARCore
08-21 17:29:57.082 14916 14934 E Unity   :   at (wrapper managed-to-native) UnityEngine.XR.ARCore.Api:UnityARCore_setCameraPermissionProvider (UnityEngine.XR.ARCore.Api/CameraPermissionRequestProvider)
08-21 17:29:57.082 14916 14934 E Unity   :   at UnityEngine.XR.ARCore.ARCoreCameraExtension.Register () [0x00000] in <filename unknown>:0
08-21 17:29:57.082 14916 14934 E Unity   :
08-21 17:29:57.082 14916 14934 E Unity   : (Filename:  Line: -1)
08-21 17:29:57.082 14916 14934 E Unity   :

from arfoundation-samples.

tdmowrer avatar tdmowrer commented on June 10, 2024

@Collision11 I've seen that before when you also have the GoogleARCore plugin in your project (this conflicts with the ARCore XR Plugin package). Is that the case?

from arfoundation-samples.

 avatar commented on June 10, 2024

@tdmowrer I have compiled builds previously on problem (desktop PC) system using ARCore, but current project is a straight clone from this repo, and I have not added anything from the Google repo. Can't be the device, because I can build to it functionally using the same cloned repo (this) on my macbook.

image

from arfoundation-samples.

TevfikUfuk avatar TevfikUfuk commented on June 10, 2024

I opened an empty project and install AR Foundation- ARCore XR- ARKit XR. Then I created a scene and put AR Session and AR Session Origin and deployed to my phone Samsuns S8. It didnt work. The same issue.

Also, I get a fresh copy of this repo but this time it is worked. Strange.

from arfoundation-samples.

MichaelMilstead avatar MichaelMilstead commented on June 10, 2024

Same problem here with "Unable to find UnityARCore". This started happening after I used ARCore in a different project, but I haven't added ARCore to the project that this error is happening on.

from arfoundation-samples.

tjudemon avatar tjudemon commented on June 10, 2024

still got whole black screen!!

from arfoundation-samples.

TevfikUfuk avatar TevfikUfuk commented on June 10, 2024

I still have this problem too

from arfoundation-samples.

tdmowrer avatar tdmowrer commented on June 10, 2024

Hi folks,

We've been unable to reproduce this issue. Could you please submit a bug report and include a project which reproduces this issue (I know you've said this repo causes it, but there must be a variable we're missing).

Please post the case id here so I can find it faster.

-Tim

from arfoundation-samples.

TevfikUfuk avatar TevfikUfuk commented on June 10, 2024

Hi,

I submitted a bug related to this issue. Case id is 1078142.

from arfoundation-samples.

tdmowrer avatar tdmowrer commented on June 10, 2024

@ufktvfk Thank you; I've responded to your case. The project you attached doesn't include ARFoundation; did you mean to send me something else?

from arfoundation-samples.

TevfikUfuk avatar TevfikUfuk commented on June 10, 2024

Hi Tim,
Sorry about that. Here is the new and correct bug report case id : Case 1078262

from arfoundation-samples.

mobiius avatar mobiius commented on June 10, 2024

I'm having the same issue with my Samsung S8.
I created a new lightweight render pipeline project, removed the example assets, added an AR Session, AR Session Origin, and AR Default plane, installed AR Foundation 1.0.0-preview-17, ARCore 1.0.0-preview-18, and ARKit 1.0.0-preview-14 from the package manager.
I don't get any warnings, errors or logs when building to device. (After I originally has x86 mode turned on, vulkan selected as default API and multithreaded rendering turned on.)

I build and get a black screen. (Everything still works however, I can scan for surfaces and tap to raycast the found surface.)

from arfoundation-samples.

mobiius avatar mobiius commented on June 10, 2024

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.

from arfoundation-samples.

tdmowrer avatar tdmowrer commented on June 10, 2024

@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.

from arfoundation-samples.

mobiius avatar mobiius commented on June 10, 2024

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?

from arfoundation-samples.

tdmowrer avatar tdmowrer commented on June 10, 2024

@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.

from arfoundation-samples.

tdmowrer avatar tdmowrer commented on June 10, 2024

@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.

from arfoundation-samples.

mobiius avatar mobiius commented on June 10, 2024

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. :)

from arfoundation-samples.

tdmowrer avatar tdmowrer commented on June 10, 2024

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 :)

from arfoundation-samples.

mobiius avatar mobiius commented on June 10, 2024

should be within a couple weeks

Good to know, thanks. :)

from arfoundation-samples.

mobiius avatar mobiius commented on June 10, 2024

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. :)

from arfoundation-samples.

nathansisler avatar nathansisler commented on June 10, 2024

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

from arfoundation-samples.

beachgrub avatar beachgrub commented on June 10, 2024

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.

from arfoundation-samples.

beachgrub avatar beachgrub commented on June 10, 2024

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

from arfoundation-samples.

jelmer3000 avatar jelmer3000 commented on June 10, 2024

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

from arfoundation-samples.

ade-adisa avatar ade-adisa commented on June 10, 2024

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

from arfoundation-samples.

tdmowrer avatar tdmowrer commented on June 10, 2024

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.

from arfoundation-samples.

ade-adisa avatar ade-adisa commented on June 10, 2024

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

from arfoundation-samples.

tdmowrer avatar tdmowrer commented on June 10, 2024

@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".

from arfoundation-samples.

weblings avatar weblings commented on June 10, 2024

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

from arfoundation-samples.

vitcozzolino avatar vitcozzolino commented on June 10, 2024

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.

from arfoundation-samples.

prayash avatar prayash commented on June 10, 2024

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.

from arfoundation-samples.

woelfle2004 avatar woelfle2004 commented on June 10, 2024

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.

from arfoundation-samples.

watermelon-xi avatar watermelon-xi commented on June 10, 2024

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?

from arfoundation-samples.

derekdominoes avatar derekdominoes commented on June 10, 2024

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

from arfoundation-samples.

demanzonderjas avatar demanzonderjas commented on June 10, 2024

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

from arfoundation-samples.

chillywilson avatar chillywilson commented on June 10, 2024

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.

from arfoundation-samples.

pravinanimataar avatar pravinanimataar commented on June 10, 2024

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.

from arfoundation-samples.

JVNightRider avatar JVNightRider commented on June 10, 2024

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!

from arfoundation-samples.

zbagley avatar zbagley commented on June 10, 2024

Was running into this issue myself, and closing the app and reopening (but not rebuild or resintalling) fixed this. No clue why the first build/install runs into the black screen.

from arfoundation-samples.

AlexanderKub avatar AlexanderKub commented on June 10, 2024

Hello, I facing with strange black screen issue with ARCore supported Samsung devices, for example Galaxy S9.

In project I use:

  • Unity 2019.1.9f
  • ARFoundation 2.1.0-preview.3
  • ARCore 2.1.0-preview.5
  • LWRP 5.6.1
  • IL2CPP with ARM64 target

On application startup tracking, and camera feed work fine, but after loading new content scene(with DontDestroyOnLoad(); on AR related gameobjects) black screen appear when camera facing loaded content, but tracking still work and black screen disappear when content move out from camera. Same issue possibly appearing on Huawei P20, but I haven't possible to test personally. On others vendors devices and on iOS this method work fine.

After I change content loading workflow to prefabs instantiate, this issue move out, but not for all content, for example issue still exist for objects how i think with transparent particles system.
In my opinion this LWRP related issue, but i haven't more possibility for testing. I don't familiar with Samsung devices graphics unusual features what could affect on work in this way.

Maybe did someone facing this same problems? Or anyone have ideas how to find the reasons of this behaviour? I will be glad yours advices.

from arfoundation-samples.

MarioUnity avatar MarioUnity commented on June 10, 2024

Can you give us the model number of the S9 device you are using?

from arfoundation-samples.

AlexanderKub avatar AlexanderKub commented on June 10, 2024

I did not correctly indicate the model, it’s S10, not S9. Model number Sm-g973f.

from arfoundation-samples.

tdmowrer avatar tdmowrer commented on June 10, 2024

@AlexanderKub I think you might be seeing a couple of issues:

  1. We don't have great LWRP support at the moment. Support will be more robust in a coming release.
  2. There is a known issue associated with scene switching. That will also be fixed shortly.

from arfoundation-samples.

AlexanderKub avatar AlexanderKub commented on June 10, 2024

Thanks for the answer, then we will wait for updates.

from arfoundation-samples.

cparki3 avatar cparki3 commented on June 10, 2024

I have been messing with a direct clone of this project for a couple of days now with a Galaxy S10+ and I either end up with an instant crash or black screen. I have camera permissions on and I can build within one scene that links to other scenes. The second I try to access any AR scene, the app crashes.

from arfoundation-samples.

MarioUnity avatar MarioUnity commented on June 10, 2024

@cparki3 Could you provide me with the model # of your Galaxy S10+? We are currently investigating an issue with the S10e, and will look into the S10+.

from arfoundation-samples.

Morgan-6Freedom avatar Morgan-6Freedom commented on June 10, 2024

👍 Working with

  • Android 9

  • Unity 2019.1

  • ARCore XR plugin 2.1.1

  • AR Foundation 2.1.3

  • Uncheck AR Core Supported in PlayerSettings

from arfoundation-samples.

cparki77 avatar cparki77 commented on June 10, 2024

@MarioUnity Sorry for the delay! My model # is SM-G975U
I'm also going to try the latest samples in a fresh clone this weekend to see if it may have been resolved since then.

from arfoundation-samples.

macklinb avatar macklinb commented on June 10, 2024

Probably not relevant to all, but I was getting a black screen with the following setup:

  • Unity 2019.2.10f1 (on Windows)
  • AR Foundation / AR Subsystems / ARCore XR Plugin / ARKit XR Plugin (all v3.0 preview-4)
  • Samsung Galaxy S7 edge (G935F) with Android 7.0 (Nougat)

And the following printed in logcat, with no other errors or messages:

OPENGL NATIVE PLUG-IN ERROR: GL_INVALID_ENUM: enum argument out of range

After trying everything I could, the only thing that managed to solve it was to update the device from Android 7 to 8. What's strange is that vanilla ARCore (i.e. without AR Foundation) worked perfectly fine in Nougat - and is officially supported, but AR Foundation + ARCore XR Plugin did not. I'd be interested to know if anyone else has experienced the same thing.

from arfoundation-samples.

zoidberg67 avatar zoidberg67 commented on June 10, 2024

I'm also getting an issue with a blank screen on first run using il2cpp
-Unity 2019.2.11f1 but had the issue with 2.10 as well
-Samsung S8
After hitting allow when I get the prompt for camera access the following shows in the logcat

"11/05 09:38:51.893 5227 5227 Error Unity: Exception: No such proxy method: UnityEngine.XR.ARCore.ARCorePermissionManager.OnPermissionGranted(System.String)"

followed by two blank errors and

"11/05 09:38:51.893 5227 5227 Error Unity: (Filename: currently not available on il2cpp Line: -1)"

then one final blank error

from arfoundation-samples.

ar4ds avatar ar4ds commented on June 10, 2024

Mark, same problem on iPhoneMax, i've used official LWRP material (Packages>ARKit XR Plugin>Asset>Shaders>ARKitLWRPBackground.shader)Shader in "ARCameraBackground" Component, but background still black, should i add some texture to this material manually?

  • Unity 2019.2.6f1
  • AR Foundation 3.0.1
  • ARKit XR Plugin 3.0.1
  • Lightweight RP 6.9.2

from arfoundation-samples.

rehanpunjwani avatar rehanpunjwani commented on June 10, 2024

I am facing the same problem. I made the app using the instructions from the coursera course and everytime App crashes or shows black screen after asking for permission. I am using Galaxy A6 plus and Unity 2019.2.

from arfoundation-samples.

mdurand42 avatar mdurand42 commented on June 10, 2024

This issue has become a catch-all for a variety of topics/issues. Closing. Please create new issues as needed.

from arfoundation-samples.

regalstreak avatar regalstreak commented on June 10, 2024

Wanna leave this here, I had forgotten to add an AR Session which caused the black screen.

from arfoundation-samples.

arthurvolpb avatar arthurvolpb commented on June 10, 2024

I finally got it working. I was having the black screen issue when building to iOS.

I followed this tutorial: https://www.youtube.com/watch?v=eu_eG0eTFlA

Using older versions of ARFoundation and ARKit seems to do the trick. Also, make sure you fill that "Camera Usage Description" mentioned above.

There is also a tutorial for Android

from arfoundation-samples.

Parmeet349 avatar Parmeet349 commented on June 10, 2024

I am getting black screen in my Poco F1
I have installed
ARFoundation
ARCore
Form the package manager
Also unchecked the AR Support from the player settings

from arfoundation-samples.

hamza-alsawy avatar hamza-alsawy commented on June 10, 2024

i made a small GPS AR application .. no error appears when i Run the application but with a black screen from the AR camera. However, when i build the application errors show up for the AR Core Plugin.

BuildFailedException: "ARCore Supported" (Player Settings > XR Settings) refers to the built-in ARCore support in Unity and conflicts with the "ARCore XR Plugin" package.
UnityEditor.XR.ARCore.ARCorePreprocessBuild.EnsureARCoreSupportedIsNotChecked () (at Library/PackageCache/[email protected]/Editor/ARCoreBuildProcessor.cs:59)
UnityEditor.XR.ARCore.ARCorePreprocessBuild.OnPreprocessBuild

bild error
ARcore
optional
XR

from arfoundation-samples.

rstecca avatar rstecca commented on June 10, 2024

In case you fellows stumble upon this with Unity 2019.4.x what worked for me was to

disable Project Settings > Player > XR Settings > ARCore Supported and
enable Project Settings > XR Plugin Management > Plug-in Providers : ARCore

2020-10-05 16_38_28-TopTalTestB - SampleScene - Android - Unity 2019 4 6f1 Personal  PREVIEW PACKAGE
2020-10-05 16_38_56-TopTalTestB - SampleScene - Android - Unity 2019 4 6f1 Personal  PREVIEW PACKAGE

from arfoundation-samples.

ahmedaniss25 avatar ahmedaniss25 commented on June 10, 2024

Problem fixed here : https://youtu.be/c6Zbqm5Fys8

from arfoundation-samples.

2905Yatharth avatar 2905Yatharth commented on June 10, 2024

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.

what to do in the case of Android Phone ?

from arfoundation-samples.

tdmowrer avatar tdmowrer commented on June 10, 2024

@2905Yatharth Black screen just means "something didn't work" and is a symptom with many possible causes. I suggest you open a new issue with specific steps taken, device model, SDK versions, etc. rather than add to this (now very old) thread.

from arfoundation-samples.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.