Unintended Manifest Modifications by XRSessionFeatureBuildHooks for Non-AndroidXR OpenXR Platforms in Unity

Open
#9 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
android, csharp, unity

Research direction

Start by locating XRSessionFeatureBuildHooks.ProvideManifestRequirement() and AndroidXRBuildUtils.IsUnityAndroidXRActive(), then inspect how the active Unity build target or profile is detected. Done means non-AndroidXR OpenXR builds leave manifests unchanged while AndroidXR builds still receive the required modifications.

Written by the indexing model from the issue text.

Description

Hi Google Team,
we have noticed an issue with the XRSessionFeatureBuildHooks Class in Unity Projects that use the OpenXR plugin across multiple plattforms.

When the AndroidXR Package is present in the project, the class injects additional configurations in the manifest files on build time, regardless of whether the current build target is AndroidXR or another OpenXR Plattform.

Currently the compiler flag UNITY_OPEN_XR_ANDROID_XR is defined as soon as the AndroidXR package is included in the project, rather than being conditional on the actual build profile. As a result, AndroidXRBuildUtils.IsUnityAndroidXRActive() always returns true, leading to unwanted manifest modifications for non AndroidXR builds.

Please adjust the detection logic in ProvideManifestRequirement() and AndroidXRBuildUtils.IsUnityAndroidXRActive(), so that they only modify the manifest and return true respectively when the active build target is AndroidXR.

Thanks

Best regards
David Schrott
SAP SE

Dominant language
C#
Stars
95
Forks
14
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from android/android-xr-unity-package

All issues in android/android-xr-unity-package

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.