Updated from Unity version 2022 to version 6, magicleap in AR foundation makes a compilation error

Give us as much detail as possible regarding the issue you’re experiencing:

Hello, i’ve updated the the editor version from 2022 to v 6000.0.51f1.
I get an error on Library/PackageCache/com.unity.xr.magicleap@4e7d0d3992e4/Runtime/URP/SegmentedDimmer/SegmentedDimmer.cs at line 250.
It seems that the code is calling a method RTHandles.Alloc with the wrong arguments, it looks like like it’s a problem of wrong versions installed. See the picture attached.

I tried to uninstall the AR Foundation, and reinstall it, but the problem is still there.
I slo tried to restart Unity.
Any idea ?
Here are some screenshots of my packages in case it’s useful


**Unity Editor version6000.0.51f1:
Host OS: MacOS 14.4.1 (23E224)

I tried also the AR sample project in Unity v6, then I added the magic leap package via package manager, and I got the same 3 errors.

Hey @jptsetung,

Welcome to the Magic Leap Developer Forums!

The Magic Leap XR Plugin is deprecated and has not been updated since early 2023.

I would recommend uninstalling that and instead, you use the OpenXR workflow.
You can download the latest MLSDK (v2.6.0) from the Magic Leap Hub.
This will provide you with a .tgz (tarball) file that you can then add to your projects packages.

Once you have added the package to your project, navigate to your projects XR-Plugin Management settings and ensure OpenXR is checked, along with Magic Leap 2 support.

The error you are getting is being caused by the fact that the Unity URP Core package has been updated over time while the Magic Leap XR Plugin has not been updated.

If you wish to continue using the Magic Leap XR Plugin, you can always try downgrading the URP Core Package to see if that works. Then, close Unity, delete your projects Library folder, and then open the project again. This will cause Unity to regenerate the Library folder.

I’m not sure that it will work, but it’s something you can try if you like.

Let me know if this works for you!

Best,
Corey