Search Unity

Question Warnings in editor when using custom XRSystem

Discussion in 'AR' started by fherbst, Jun 9, 2020.

  1. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    802
    We're working on a custom XR SDK Subsystem. Everything works fine, but in the editor we're getting a warning message since ARFoundation 4:

    ⚠️ No active UnityEngine.XR.XRInputSubsystem is available. Please ensure that a valid loader configuration exists in the XR project settings.

    We didn't get that warning in ARFoundation 3.x as far as I'm aware, and frankly are not sure what that means, as far as I can see neither ARKit nor ARCore backends contain an explicit XRInputSubsystem besides creating it in the loader (what we do as well).

    Any insights how to get rid of that warning?
     
    Last edited: Jun 9, 2020
  2. todds_unity

    todds_unity

    Joined:
    Aug 1, 2018
    Posts:
    324
  3. KyryloKuzyk

    KyryloKuzyk

    Joined:
    Nov 4, 2013
    Posts:
    1,142
    XRInputSubsystem is an integrated subsystem and is registered and implemented on native side. I tried to register it in Editor using Reflection, but this is just crashing Unity. I think it crashes because there is no implementation found.

    WARNING, THIS CODE CRASHES UNITY

    Assembly.Load("UnityEngine.SubsystemsModule")
    .GetType("UnityEngine.Internal_SubsystemDescriptors")
    .GetMethod("Internal_InitializeManagedDescriptor", BindingFlags.NonPublic | BindingFlags.Static)
    .Invoke(null, new object[] {IntPtr.Zero, new XRInputSubsystemDescriptor()});
     
  4. Dalton-Lima

    Dalton-Lima

    Joined:
    Dec 21, 2016
    Posts:
    19
    I am not using a custom XR SDK Subsystem, just the regular ARKit/ARCore XR Plugins, and get 4 similar warnings in the Editor.

    The apps are compiling and working for iOS and Android thought. In previous ARFoundation versions, I could fake a PlaneDetection and debug in the Editor.
     
  5. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    802
    @Dalton-Lima our implementation that I was referring to in my original question is now done and released - you can test a lot of ARFoundation features right in the Editor with it, for example planes, meshing, anchors, pointclouds, image tracking, ...
    Link in my signature or here: get.needle.tools/ar-simulation
     
    Dalton-Lima likes this.
  6. Dalton-Lima

    Dalton-Lima

    Joined:
    Dec 21, 2016
    Posts:
    19
    Thanks @fherbst
    Already bought it, seems very polished!
     
  7. scrant

    scrant

    Joined:
    Jun 1, 2017
    Posts:
    73
    @fherbst I have your AR Simulation package but I am getting the same "No active UnityEngine.XR.XRInputSubsystem is available." error as you did above. And no input is happening in the Game View. It was working in ARF 3.x but just upgraded to 4.1.1. Is ARS not working with that? Please advise. Thanks.
     
    fherbst likes this.