Unity-Technologies / arfoundation-samples

Example content for Unity projects based on AR Foundation
Other
3.03k stars 1.13k forks source link

[Bug] No active UnityEngine.XR.XRInputSubsystem is available #854

Closed marcinwalus closed 3 years ago

marcinwalus commented 3 years ago

Describe the bug I imported AR Foundation in my project and configured XR Plug-in management to initialise on startup and tuned on provider for ARKit. After cloning repo with project (repo contains XR folder with corresponding loaders and settings) and building iOS Player from build script, by calling BuildPipeline.BuildPlayer(buildPlayerOptions); and running generated iOS project on device I'm getting following errors and no AR Session is started:

No active UnityEngine.XR.XRInputSubsystem is available. Please ensure that a valid loader configuration exists in the XR project settings. No active UnityEngine.XR.ARSubsystems.XRCameraSubsystem is available. Please ensure that a valid loader configuration exists in the XR project settings. No active UnityEngine.XR.ARSubsystems.XRRaycastSubsystem is available. Please ensure that a valid loader configuration exists in the XR project settings. No active UnityEngine.XR.ARSubsystems.XRDepthSubsystem is available. Please ensure that a valid loader configuration exists in the XR project settings. No active UnityEngine.XR.ARSubsystems.XRPlaneSubsystem is available. Please ensure that a valid loader configuration exists in the XR project settings. No active UnityEngine.XR.ARSubsystems.XRAnchorSubsystem is available. Please ensure that a valid loader configuration exists in the XR project settings.

The point is that after second build it works correctly. In scenario when building projects using CI it is very annoying.

To Reproduce Steps to reproduce the behavior:

  1. Configure AR Foundation in project
  2. Build iOS Player from build script (ie. /Applications/Unity/Hub/Editor/2020.3.13f1/Unity.app/Contents/MacOS/Unity -quit -batchmode -nographics -logFile editor_ios.log -projectPath -buildTarget iOS -executeMethod BuildScript.PerformIOSBuild)
  3. Run exported iOS project
  4. AR Session is not starting and "No active UnityEngine.XR.XRInputSubsystem is available" message is logged.

Expected behavior AR Session should start correctly.

Actual behavior AR Session is not starting.

Smartphone (please complete the following information):

ARIssue01 ARIssue02 ARIssue03

todds-unity commented 3 years ago

Please file a bug at https://unity3d.com/unity/qa/bug-reporting .