Unity-Technologies / arfoundation-samples

Example content for Unity projects based on AR Foundation
Other
3.07k stars 1.15k forks source link

[Bug] XR Management build error due to an incompatible function call under Unity 2019 LTS #819

Closed AdrienMgm closed 3 years ago

AdrienMgm commented 3 years ago

Unity bug report case number (Case 1338921) [Bug] XR Management build error under Unity 2019 LTS

Describe the bug We are using Unity 2019.4.14f1 LTS for compatibility purpose with our asset bundles used with previous version of the app we made. We can't upgrade to 2019.4.15f1 or higher because of an issue with the assets bundles (cf (Case 1317771) [iOS] Asset Bundles incompatibility across 2019 LTS versions).

The problem we are facing is a build error in the xr.management package when compiled with Unity 2019.4.14f1.

Library/PackageCache/com.unity.xr.management@4.0.1/Editor/XRGeneralBuildProcessor.cs(36,52): error CS0117: 'BuildPipeline' does not contain a definition for 'GetBuildTargetName'
Library/PackageCache/com.unity.xr.management@4.0.1/Editor/XRGeneralBuildProcessor.cs(83,52): error CS0117: 'BuildPipeline' does not contain a definition for 'GetBuildTargetName'

To Reproduce Steps to reproduce the behavior:

  1. Open Unity 2019.4.14f1
  2. Use latest AR packages
  3. Try to build an empty app using the minimal AR requirements (ARSession, ARCamera, etc.)
  4. See error above

Expected behavior No build error during compilation.

Actual behavior Build error due to an incompatible function call.

Library/PackageCache/com.unity.xr.management@4.0.1/Editor/XRGeneralBuildProcessor.cs(36,52): error CS0117: 'BuildPipeline' does not contain a definition for 'GetBuildTargetName'
Library/PackageCache/com.unity.xr.management@4.0.1/Editor/XRGeneralBuildProcessor.cs(83,52): error CS0117: 'BuildPipeline' does not contain a definition for 'GetBuildTargetName'

Versions :

tdmowrer commented 3 years ago

XR Management 4 requires Unity 2019.4.15f1 or later. If you cannot upgrade, you might be able to force Unity to use an earlier version of XR Management by explicitly adding it to your project's manifest.json. 3.2.16 should be okay (3.2.17 also requires 2019.4.15f1).

AdrienMgm commented 3 years ago

It's unfortunate that the package management system and all this packages supporting different Unity versions produce this kind of blocking position.

Anyway, thank you for the potential fix, we will try that.