# Having OpenXR in your project breaks plane finding

**URL:** <https://forum.magicleap.cloud/t/having-openxr-in-your-project-breaks-plane-finding/2789>\
**Category:** Unity Development\
**Tags:** development, unity\
**Created:** [October 31, 2023, 11:47am UTC](https://forum.magicleap.cloud/t/having-openxr-in-your-project-breaks-plane-finding/2789 "2023-10-31T11:47:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![edd](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/edd/32/832_2.png) [@edd](https://forum.magicleap.cloud/u/edd)\
**Post date:** [October 31, 2023, 11:47am UTC](https://forum.magicleap.cloud/t/having-openxr-in-your-project-breaks-plane-finding/2789/1 "2023-10-31T11:47:36Z")

</div>

The Magic Leap Unity SDK has a lot of OpenXR related code in it that compiles in based on the presence of the Unity OpenXR package in your project. This is done by assembly definition version defines.

 ![image](https://us1.discourse-cdn.com/flex019/uploads/magicleap1/original/2X/4/4dcc18736bc07471795ff04826e98548c9fe9eaa.png)

Many real-world projects support multiple platforms some that support OpenXR and some that don't, so it is perfectly reasonable to have the OpenXR package in the project, but only use it on certain platforms.

From version v1.10 of the com.magicleap.unitysdk package some OpenXR plane logic was introduced. When OpenXR is included in the project this gets compiled in and replaces the non-OpenXR plane finding logic. The result is that plane finding doesn't work and you get the following error

```auto
Error: MLOpenXRCreatePlaneTracker in the Magic Leap API failed. Reason: MLResult_UnspecifiedFailure

```

You can work around the problem by removing the OpenXR version defines from assembly definition in a custom version of the package.

OpenXR in Unity isn't even supported by Magic Leap yet, so why is it in the package?

Even if it was supported, activating it should be based on more than just having the Unity OpenXR package in the project. Like ticking OpenXR in the XR settings, a manual define, or even better having a separate MagicLeap OpenXR package you can choose to include.

---

<div class="post-metadata">

**Author:** ![kbabilinski](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/kbabilinski/32/19_2.png) [@kbabilinski](https://forum.magicleap.cloud/u/kbabilinski)\
**Post date:** [October 31, 2023, 3:58pm UTC](https://forum.magicleap.cloud/t/having-openxr-in-your-project-breaks-plane-finding/2789/3 "2023-10-31T15:58:02Z")

</div>

Sorry to hear you ran into this issue and thank you for the detailed description of the issue and feedback. I have shared this with our voice of customer team.

---

<div class="post-metadata">

**Author:** ![rich](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@rich](https://forum.magicleap.cloud/u/rich)\
**Post date:** [April 10, 2024, 3:20pm UTC](https://forum.magicleap.cloud/t/having-openxr-in-your-project-breaks-plane-finding/2789/4 "2024-04-10T15:20:06Z")

</div>

I'm currently running into this issue as well, and I am unable to update to OpenXR, as it currently causes application-breaking conflicts with Meta (when using the Oculus plugin provider, which is required for many of Meta's features, as OpenXR is not fully supported on Meta)

Has any progress been made on fixing this issue?

---

<div class="post-metadata">

**Author:** ![kbabilinski](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/kbabilinski/32/19_2.png) [@kbabilinski](https://forum.magicleap.cloud/u/kbabilinski)\
**Post date:** [April 16, 2024, 3:29pm UTC](https://forum.magicleap.cloud/t/having-openxr-in-your-project-breaks-plane-finding/2789/5 "2024-04-16T15:29:05Z")

</div>

@rich Do you mind creating a new topic and including more details on the errors or behavior you experience when trying to use Magic Leap OpenXR?

---

<div class="post-metadata">

**Author:** ![kbabilinski](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/kbabilinski/32/19_2.png) [@kbabilinski](https://forum.magicleap.cloud/u/kbabilinski)\
**Post date:** [April 16, 2024, 3:29pm UTC](https://forum.magicleap.cloud/t/having-openxr-in-your-project-breaks-plane-finding/2789/6 "2024-04-16T15:29:26Z")

</div>


