Azure / azure-remote-rendering

SDK and samples for Azure Remote Rendering
MIT License
106 stars 38 forks source link

[Question] Enabling Android support in Unity 2021/2022 with XR management 4.x #105

Closed NoTuxNoBux closed 1 year ago

NoTuxNoBux commented 1 year ago

After being confused for a bit as to why Device, platform and/or XR plugin combination is not supported! is being thrown on our Meta Quest 2 in our project, I think I pinned it down to XR_MANAGEMENT_PLUGIN_AVAILABLE is not being set because the assembly definition only defines it for XR Management 3.1:

{
    "name": "com.unity.xr.management",
    "expression": "3.1",
    "define": "XR_MANAGEMENT_PLUGIN_AVAILABLE"
},

We work with Unity 2022.3, but also have projects on 2021.3 that are already on com.unity.xr.management 4.x mostly 'out of the box' by using recent version of Microsoft OpenXR and the MRTK.

XR Management 3.x hasn't been updated since late 2020 (3.2.17), so is there any chance of relaxing this constraint to also support 4.x? The latest version is 4.4.0 at the time of writing.

(I'm not too familiar with version defines, but it appears to not even be a range, and 3.1 is highly specific and an old version from 2020-02-07. Even within 3.x there have been many more recent releases.)

Thanks!

jloehr commented 1 year ago

Hi @NoTuxNoBux,

the version define shouldn't be the issue. Providing just a single version as is, means any version equal or higher than provided, including the current 4.x version:

image

I also just double-checked with our Quickstart app on Unity 2021 and 2022, which is using XR Plugin Management 4.3.3. And it is working fine.

You may be missing the checkmark for the "Azure Remote Rendering" OpenXR feature in the Android tab of the OpenXR Project Settings window. Can you double-check in your projects: image

NoTuxNoBux commented 1 year ago

Indeed, I was looking incorrectly and forgot the defines are scoped to the assembly definition defining them, my apologies.

The necessary Android feature was enabled, but due to Unity shenanigans it seems to have disabled itself again. I'll reopen if there are further issues, thanks!

jloehr commented 1 year ago

Glad I could help.

You can also always check our Project Validator for any issues or missing configurations. You can open the Project Validator window by choosing the the Validate Project entry from the Remote Rendering menu in the Unity editor toolbar.

image