Unity-Technologies / XR-Interaction-Toolkit-Examples

This repository contains various examples to use with the XR Interaction Toolkit
Other
1.09k stars 357 forks source link

[AR] ARCore XR Plugin is not installed by default #2

Open hybridherbst opened 4 years ago

hybridherbst commented 4 years ago

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.

sivatejachigicherla commented 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

mistletoe-fujimura commented 4 years ago

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

mistletoe-fujimura commented 4 years ago

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

thomas-stockx commented 4 years ago

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