microsoft / MixedRealityToolkit-Unity

This repository is for the legacy Mixed Reality Toolkit (MRTK) v2. For the latest version of the MRTK please visit https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity
https://aka.ms/mrtkdocs
MIT License
6k stars 2.12k forks source link

Latest MRTK3 drop (pre-17) dependencies clash with Latest Azure Spatial Anchors ( 2.14.1) #11671

Closed LocalJoost closed 1 year ago

LocalJoost commented 1 year ago

This issue has been migrated a new MRTK repository, and the status of this issue will now be tracked at the following location:


Describe the bug

When you install MRTK3 pre-17 in a clean project and configure it, then add Azure Spatial Anchors, you will get 143 errors of the type: GUID [300c4804f47d540fc9efec07999accf7] for asset 'Packages/com.unity.xr.arsubsystems/Editor' conflicts with: 'Packages/com.unity.xr.arfoundation/Editor/ARSubsystems' (current owner) We can't assign a new GUID because the asset is in an immutable folder. The asset will be ignored.

To reproduce

Expected behavior

No errors ;)

Screenshots

image

Setup

Target platform

Additional context

Repo : https://github.com/LocalJoost/TestConflict3.git

shaynie commented 1 year ago

@LocalJoost - Thanks for the bug. This is caused by the Azure Spatial Anchors core package pulling in com.unity.xr.arsubsystems v4.0.8 as a dependency. The arsubsystems package was deprecated and its functionality was moved in to the ARFoundation package in version 5.0.0. Since the MRTK3 input package depends on ARFoundation 5.0.5, you see the conflicting class GUIDs if a pre 5.x ARSubsystems package is imported. The workaround is to manually upgrade the ARSubsystems package in your project to 5.0.2, which just removes all the conflicting classes.

Workaround: In Unity, open the Package Manager window, and select the drop down arrow next to the '+'. Select 'Add package by name", and then enter 'com.unity.xr.arsubsystems' in the name field, and '5.0.2' in the version field.

I'm converting this issue to a discussion so that others can find the workaround. I'm also requesting that the ASA team upgrade their ARFoundation requirement to 5.x+ to avoid this in their next release.