Open hybridherbst opened 4 years ago
Preequisites: Unity Version : 2019.2 or later Packages required : ARFoundation, XR Interaction Toolkit, ARCore XR Plugin, ARKit XR Plugin Package Dependencies : ARSubsystems, XR Legacy Input Helpers
Unity Version: 2019.3 or later. Package: XR Interaction Toolkit is already loaded. If you "Switch Platform" to Android, you will need to "Install XR Plugin Management" at Project Settings, enable "ARCore" in Plug-in Providers section and set the minimum level of Android SDK to 24 (Android 7.0) at Other Settings of Player Settings. But even after doing them, the sample VR app didn't show in VR mode (dual windows). Why !?
And if you install the package 'AR Foundation' ver. 3.x, you will encounter the compile errors such as "error CS1061: 'XRCameraSubsystem' does not contain a definition for 'shaderName' ...".
If you use ver. 2.x of AR Foundation and AR Subsystems, the errors above don't occur. But still it shows only single window (non VR mode).
The fact that this issue has been open for 9 months with no comment is ridiculous. I can't even get the AR example working on Android (although I've managed to use AR Foundation without this toolkit on several previous projects).
After adding the ARcore package and enabling it, I get an instant crash after the splash screen and enabling camera permission:
2020-08-17 14:00:37.311 11397-11421/? E/AndroidRuntime: FATAL EXCEPTION: UnityMain
Process: com.unity.xr.interaction.toolkit, PID: 11397
java.lang.Error: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Version '2020.1.2f1 (7b32bc54ba47)', Build type 'Release', Scripting Backend 'mono', CPU 'armeabi-v7a'
Build fingerprint: 'google/flame/flame:11/RPB3.200720.005/6705141:user/release-keys'
Revision: 'MP1.0'
ABI: 'arm'
Timestamp: 2020-08-17 14:00:36+0200
pid: 11397, tid: 11421, name: UnityMain >>> com.unity.xr.interaction.toolkit <<<
uid: 10475
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
Cause: null pointer dereference
r0 00650070 r1 00730069 r2 00000000 r3 00000000
r4 bb571430 r5 f1e1c524 r6 bb571430 r7 00000000
r8 bb25d3b0 r9 80808080 r10 00000000 r11 00000000
ip bb2668a8 sp c273c8f8 lr bb225fad pc 00000000
managed backtrace:
#00 (wrapper managed-to-native) UnityEngine.XR.ARCore.ARCoreSessionSubsystem/NativeApi:UnityARCore_session_update (UnityEngine.ScreenOrientation,UnityEngine.Vector2Int)
#01 UnityEngine.XR.ARCore.ARCoreSessionSubsystem/ARCoreProvider:Update (UnityEngine.XR.ARSubsystems.XRSessionUpdateParams) <0x43>
#02 UnityEngine.XR.ARSubsystems.XRSessionSubsystem:Update (UnityEngine.XR.ARSubsystems.XRSessionUpdateParams) <0x3f>
#03 UnityEngine.XR.ARFoundation.ARSession:Update () <0x133>
#04 (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
at UnityEngine.XR.ARCore.ARCoreSessionSubsystem.NativeApi.UnityARCore_session_update (UnityEngine.ScreenOrientation,UnityEngine.Vector2Int)(Native Method)
at UnityEngine.XR.ARCore.ARCoreSessionSubsystem.ARCoreProvider.Update (UnityEngine.XR.ARSubsystems.XRSessionUpdateParams)(0x43:67)
at UnityEngine.XR.ARSubsystems.XRSessionSubsystem.Update (UnityEngine.XR.ARSubsystems.XRSessionUpdateParams)(0x3f:63)
at UnityEngine.XR.ARFoundation.ARSession.Update ()(0x133:307)
at System.Object.runtime_invoke_void__this__ (object,intptr,intptr,intptr)(Native Method)
I've been using the following packages (latest verified):
This creates a lot of confusion, especially for beginners. Both ARCore and ARKit should "just work" out of the box on this sample repo.
Also, there should be a warning when using ARFoundation and building for Android without this present; right now you just get a black screen.