Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug No active UnityEngine.XR.ARSubsystems.XRCameraSubsystem is available. ARSession.state = Unsupported

Discussion in 'AR' started by BlueSpirit, Dec 13, 2021.

  1. BlueSpirit

    BlueSpirit

    Joined:
    Jun 10, 2013
    Posts:
    33
    Hello,

    We're running into some issues with ARFoundation on iOS. It shows the warning "No active UnityEngine.XR.ARSubsystems.XRCameraSubsystem is available" and it returns "Unsupported" when I log ARSession.state, and shows a black screen.

    The weird thing is that we're running 2 Unity Cloud Builds for iOS; a dev build internal testing and a build for TestFlight. Both builds are using the exact same settings and code. AR works fine on the dev build, but for some reason it doesn't work for the TestFlight build.

    We've been creating TestFlight builds with UCB for over a year now and never had any issues until a few weeks ago.
    • Unity 2020.1.17
    • ARFoundation 4.1.7
    • ARKit 4.1.7
    • ARKit is enabled in the XR Plug-in Management settings
    • Tested on iPhone 10, 11, 13
    We've tried updating Unity to 2020.3.23 and updating ARFoundation and ARKit to 4.2.1, but no luck either.

    Any ideas what's causing this?

    Thanks!
     
  2. KyryloKuzyk

    KyryloKuzyk

    Joined:
    Nov 4, 2013
    Posts:
    1,128
    This issue may be connected to this bug report:
    https://issuetracker.unity3d.com/is...ed-and-unity-editor-build-target-is-not-set-t

    When you switch the Build Target to iOS, the ARKitBuildProcessor will not run the setup process correctly, and a build will be corrupted. In my experience, the second build in a row succeeds. I don't have experience with UCB, but is there a way to make a new build without switching the build target?
     
    Last edited: Dec 15, 2021
  3. BlueSpirit

    BlueSpirit

    Joined:
    Jun 10, 2013
    Posts:
    33
    Thank you so much!
    I think that's the same issue UCB is having. Although I can't see in the UCB build logs if "UNITY_XR_ARKIT_LOADER_ENABLED" was used. I manually set the UNITY_XR_ARKIT_LOADER_ENABLED define in the UCB config for my iOS builds and it's been working so far (tested making several UCB builds and uploaded them to TestFlight). The "No active UnityEngine.XR.ARSubsystems.XRCameraSubsystem is available" warning is gone and it's properly detecting ARKit and setting the correct ARSession.state. Thanks again!
     
    KyryloKuzyk likes this.
  4. BlueSpirit

    BlueSpirit

    Joined:
    Jun 10, 2013
    Posts:
    33
    Hmm for some reason this issue is popping up again. Showing warning "No active UnityEngine.XR.ARSubsystems.XRCameraSubsystem is available" and ARSession.state = "Unsupported". "UNITY_XR_ARKIT_LOADER_ENABLED" is defined in the UCB config and ARKit is enabled in XR Plug-in Management (Requirement: Optional).

    We're using:
    • Unity 2020.3.23
    • ARFoundation 4.1.9 (verified)
    • ARKit 4.1.9 (verified)
    • XR Plugin Management 4.1.0 (verified)
    • ARKit is enabled in the XR Plug-in Management settings
    • Tested on iPhone 10, 11, 13
    I don't have a mac, so I can only test UCB iOS builds.
    Any ideas?
     
  5. todds_unity

    todds_unity

    Joined:
    Aug 1, 2018
    Posts:
    324
  6. BlueSpirit

    BlueSpirit

    Joined:
    Jun 10, 2013
    Posts:
    33
    I was able to get a hold of a macbook. Everything works just fine when I make local builds, but for some reason it doesn't with iOS UCB builds. I tried making UCB builds with different Xcode versions, but no luck..