Skip to content

Commit 09f6dfd

Browse files
committed
Android XR Unity Extensions v1.2.0
1 parent a7e7b81 commit 09f6dfd

35 files changed

+816
-583
lines changed

Assets/Banner.png.meta

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/iconBG.png.meta

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/iconFG.png.meta

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CHANGELOG.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,46 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
88
and this package adheres to
99
[Semantic Versioning](http://semver.org/spec/v2.0.0.html).
1010

11+
## [1.2.0] - 2025-09-30
12+
13+
### Editor version and package compatibility
14+
15+
* This version of the package requires minimal Unity Editor version `6000.1.17f1`. You can install the official **Unity 6.1** (e.g. `6000.1.17f1` or newer) from the Unity Hub.
16+
* Package dependencies updated in this version:
17+
* OpenXR Plugin (`com.unity.xr.openxr`) 1.15.1
18+
* AR Foundation (`com.unity.xr.arfoundation`) 6.2.0
19+
* XR Plugin Management (`com.unity.xr.management`): 4.5.1
20+
* Verified compatible packages:
21+
* Unity OpenXR Android XR (`com.unity.xr.androidxr-openxr`) 1.1.0-pre.1
22+
* OpenXR Plugin (`com.unity.xr.openxr`) 1.15.1
23+
* AR Foundation (`com.unity.xr.arfoundation`) 6.3.0-pre.1
24+
* Composition Layer (`com.unity.xr.compositionlayers`) 2.1.0
25+
* XR Hands (`com.unity.xr.hands`) 1.6.1
26+
* Universal Render Pipeline (`com.unity.render-pipelines.universal`) 17.1.0
27+
28+
### Known issues
29+
* `SpaceWarpFeature` generates motion vectors in the wrong NDC space.
30+
* Unity has released the fix in **6000.1.13f1** and OpenXR Plugin **1.5.1**. Please upgrade Unity Editor and OpenXR packages to include the change.
31+
* Under **Application SpaceWarp** setting menu, check **Use Right Handed NDC** to apply the correct space on Android XR.
32+
* Also noted, on Android XR headsets, SpaceWarp does not need to be updated with the main camera's current position or rotation.
33+
* See more details in [Application SpaceWarp in OpenXR](https://docs.unity3d.com/Packages/com.unity.xr.openxr@1.15/manual/features/spacewarp.html).
34+
35+
### Added
36+
* Added extension function `XRMeshSubsystem.IsSceneMeshId(TrackableId)`.
37+
38+
### Changed
39+
* None.
40+
41+
### Deprecated
42+
* None.
43+
44+
### Removed
45+
* Removed editor settings `SpaceWarp` from `XRSessionFeature`. Please use `SpaceWarpFeature` from **OpenXR Plugins** instead.
46+
47+
### Fixed
48+
* Fixed `ARMeshManager` compatibility issue with `XRSceneMeshingFeature`.
49+
* Fixed alpha environment blend mode compatibility issue with URP.
50+
1151
## [1.1.0] - 2025-06-27
1252

1353
### Editor version and package compatibility

Editor/Internal/AndroidXRBuildUtils.cs

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,26 +53,29 @@ public static string PrintManifestElement(ManifestElement manifestElement)
5353
return string.Format("Path: {0}{1}", element, attributes);
5454
}
5555

56-
internal static bool IsAnyAndroidXRFeatureEnabled()
56+
internal static bool IsAnyAndroidXRFeatureEnabledForBuildTarget(
57+
BuildTargetGroup buildTarget)
5758
{
5859
var featureIds = OpenXRFeatureSetManager.GetFeatureSetWithId(
59-
BuildTargetGroup.Android, AndroidXRFeatureSet._featureSetId).featureIds;
60+
buildTarget, AndroidXRFeatureSet._featureSetId).featureIds;
6061
var features = FeatureHelpers.GetFeaturesWithIdsForBuildTarget(
61-
BuildTargetGroup.Android, featureIds);
62-
bool isAnyFeatureActive = features.Any(feature => feature.enabled);
62+
buildTarget, featureIds);
63+
return features.Any(feature => feature.enabled);
64+
}
6365

66+
internal static bool IsAnyAndroidXRFeatureEnabledForAndroid()
67+
{
68+
bool isAnyFeatureActive = IsAnyAndroidXRFeatureEnabledForBuildTarget(
69+
BuildTargetGroup.Android);
6470
return isAnyFeatureActive &&
6571
EditorUserBuildSettings.activeBuildTarget == BuildTarget.Android;
6672
}
6773

68-
internal static bool IsAnySessionDependentEnabled()
74+
internal static bool IsAnySessionDependentEnabled(BuildTargetGroup buildTarget)
6975
{
7076
var features = FeatureHelpers.GetFeaturesWithIdsForBuildTarget(
71-
BuildTargetGroup.Android, AndroidXRFeatureSet._sessionManagementDependentIds);
72-
bool isAnyFeatureActive = features.Any(feature => feature.enabled);
73-
74-
return isAnyFeatureActive &&
75-
EditorUserBuildSettings.activeBuildTarget == BuildTarget.Android;
77+
buildTarget, AndroidXRFeatureSet._sessionManagementDependentIds);
78+
return features.Any(feature => feature.enabled);
7679
}
7780

7881
internal static bool IsUnityAndroidXRActive()

Editor/Internal/AndroidXRFeatureSet.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,16 @@ namespace Google.XR.Extensions.Editor.Internal
5555
XRPassthroughFeature.FeatureId,
5656
XRHandMeshFeature.FeatureId,
5757
},
58-
UiName = "Android XR (Extensions)",
58+
UiName = _uiName,
5959
Description = "Feature group that provides Android XR experience and " +
6060
"subsystem implementation for AR Foundation functionality.",
6161
FeatureSetId = _featureSetId,
62-
SupportedBuildTargets = new BuildTargetGroup[] { BuildTargetGroup.Android })]
62+
SupportedBuildTargets = new BuildTargetGroup[] {
63+
BuildTargetGroup.Android,
64+
})]
6365
internal class AndroidXRFeatureSet
6466
{
67+
internal const string _uiName = "Android XR (Extensions)";
6568
internal const string _featureSetId = "com.google.androidxr.features";
6669

6770
/// <summary>

Editor/Internal/AndroidXRProjectValidationRules.cs

Lines changed: 37 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,17 @@
1919

2020
namespace Google.XR.Extensions.Editor.Internal
2121
{
22+
using System.Linq;
2223
using Unity.XR.CoreUtils.Editor;
2324
using UnityEditor;
2425
using UnityEditor.XR.OpenXR.Features;
2526

2627
internal static class AndroidXRProjectValidationRules
2728
{
28-
const string _catergory = "Android XR (Extensions)";
29+
const string _category = "Android XR (Extensions)";
30+
const string _playerSettings = "<b>Project Settings > Player Settings</b>";
31+
const string _openxrSettings = "<b>Project Settings > XR Plug-in Management > OpenXR</b>";
32+
const string _androidTab = "<b>Android</b> tab";
2933

3034
[InitializeOnLoadMethod]
3135
static void AddAndroidXRProjectValidationRules()
@@ -34,56 +38,61 @@ static void AddAndroidXRProjectValidationRules()
3438
{
3539
new BuildValidationRule
3640
{
37-
Category = _catergory,
41+
Category = _category,
3842
Message =
3943
"Android XR reuiqres resizable windows to render pop-ups correctly " +
4044
"in immersive view, such as system permission requests.",
41-
IsRuleEnabled = AndroidXRBuildUtils.IsAnyAndroidXRFeatureEnabled,
45+
IsRuleEnabled = AndroidXRBuildUtils.IsAnyAndroidXRFeatureEnabledForAndroid,
4246
CheckPredicate = () => PlayerSettings.Android.resizeableActivity,
43-
FixItMessage =
44-
"Go to <b>Project Settings > Player Settings</b>, " +
45-
"selet <b>Android</b> tab, then enable <b>Resizable Activity</b>.",
47+
FixItMessage = string.Format(
48+
"Go to {0}, under {1}, enable <b>Resizable Activity</b>.",
49+
_playerSettings, _androidTab),
4650
FixIt = () => PlayerSettings.Android.resizeableActivity = true,
4751
FixItAutomatic = true,
4852
Error = true,
4953
},
5054
new BuildValidationRule
5155
{
52-
Category = _catergory,
56+
Category = _category,
5357
Message =
5458
"Android XR features require Application Entry Point set to GameActivity.",
55-
IsRuleEnabled = AndroidXRBuildUtils.IsAnyAndroidXRFeatureEnabled,
59+
IsRuleEnabled = AndroidXRBuildUtils.IsAnyAndroidXRFeatureEnabledForAndroid,
5660
CheckPredicate = () => PlayerSettings.Android.applicationEntry ==
5761
AndroidApplicationEntry.GameActivity,
58-
FixItMessage =
59-
"Go to <b>Project Settings > Player Settings</b>, " +
60-
"selet <b>Android</b> tab, in <b>Application Entry Point</b>, " +
62+
FixItMessage = string.Format(
63+
"Go to {0}, under {1}, for <b>Application Entry Point</b>" +
6164
"select only <b>GameActivity</b>.",
65+
_playerSettings, _androidTab),
6266
FixItAutomatic = true,
6367
FixIt = () => PlayerSettings.Android.applicationEntry =
6468
AndroidApplicationEntry.GameActivity,
6569
Error = true,
6670
},
67-
new BuildValidationRule
68-
{
69-
Category = _catergory,
70-
Message = string.Format(
71-
"Android XR (Extensions) features use {0} for OpenXR lifecycle management.",
72-
XRSessionFeature.UiName),
73-
IsRuleEnabled = AndroidXRBuildUtils.IsAnySessionDependentEnabled,
74-
CheckPredicate = () => FeatureHelpers.GetFeatureWithIdForBuildTarget(
75-
BuildTargetGroup.Android, XRSessionFeature.FeatureId).enabled,
76-
FixItMessage = string.Format(
77-
"Go to <b>Project Settings > XR Plug-in Management > OpenXR </b>, " +
78-
"selet <b>Android</b> tab, select <b>{0}</b>.",
79-
XRSessionFeature.UiName),
80-
FixIt = () => FeatureHelpers.GetFeatureWithIdForBuildTarget(
81-
BuildTargetGroup.Android, XRSessionFeature.FeatureId).enabled = true,
82-
Error = true,
83-
}
71+
GetSessionDependentRule(BuildTargetGroup.Android),
8472
};
8573

8674
BuildValidator.AddRules(BuildTargetGroup.Android, androidXRProjectRules);
8775
}
76+
77+
static BuildValidationRule GetSessionDependentRule(BuildTargetGroup buildTarget)
78+
{
79+
return new BuildValidationRule
80+
{
81+
Category = _category,
82+
Message = string.Format(
83+
"Android XR (Extensions) features use {0} for OpenXR lifecycle management.",
84+
XRSessionFeature.UiName),
85+
IsRuleEnabled = () =>
86+
AndroidXRBuildUtils.IsAnySessionDependentEnabled(buildTarget),
87+
CheckPredicate = () => FeatureHelpers.GetFeatureWithIdForBuildTarget(
88+
buildTarget, XRSessionFeature.FeatureId).enabled,
89+
FixItMessage = string.Format(
90+
"Go to {0}, under <b>{1}</b> tab, select <b>{2}</b>.",
91+
_openxrSettings, buildTarget, XRSessionFeature.UiName),
92+
FixIt = () => FeatureHelpers.GetFeatureWithIdForBuildTarget(
93+
buildTarget, XRSessionFeature.FeatureId).enabled = true,
94+
Error = true,
95+
};
96+
}
8897
}
8998
}

Editor/Internal/XRSessionFeatureBuildHooks.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -240,11 +240,6 @@ protected override void OnProcessBootConfigExt(
240240
+ needsFragmentDensityMapEnabled);
241241
builder.SetBootConfigBoolean("xr-vulkan-extension-fragment-density-map-enabled",
242242
needsFragmentDensityMapEnabled);
243-
244-
bool spacewarpEnabled = sessionFeature != null &&
245-
sessionFeature.enabled && sessionFeature.SpaceWarp;
246-
Debug.LogFormat("SetBootConfigBoolean: xr-meta-enabled=" + spacewarpEnabled);
247-
builder.SetBootConfigBoolean("xr-meta-enabled", spacewarpEnabled);
248243
}
249244

250245
/// <inheritdoc/>
@@ -354,7 +349,8 @@ private bool CheckExperimentalPermission()
354349
XRSystemStateFeature systemState =
355350
AndroidXRBuildUtils.GetActiveFeature<XRSystemStateFeature>();
356351
systemStateInUse = systemState != null && systemState.enabled;
357-
return bodyTrackingInUse || systemStateInUse;
352+
bool advancedLightingInUse = false;
353+
return bodyTrackingInUse || systemStateInUse || advancedLightingInUse;
358354
}
359355
}
360356
}

Editor/Internal/XRSessionFeatureEditor.cs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,22 +40,14 @@ internal class XRSessionFeatureEditor : Editor
4040
"<b>Foveation (Legacy)</b> for legacy support. " +
4141
"Otherwise, the application will result in rendering faulty.";
4242

43-
private const string _spacewarpFieldName = "_spacewarp";
44-
private const string _spacewarpTooltip =
45-
"Enable URP Spacewarp (Vulkan) to unlock extra computation power for suitable content.";
46-
4743
private static readonly GUIContent _immersiveXRLabel = new GUIContent(
4844
"Immersive XR", _immersiveXRTooltip);
4945

5046
private static readonly GUIContent _subsamplingLabel = new GUIContent(
5147
"Subsampling (Vulkan)", _subsamplingTooltip);
5248

53-
private static readonly GUIContent _spacewarpLabel = new GUIContent(
54-
"URP SpaceWarp (Vulkan)", _spacewarpTooltip);
55-
5649
private SerializedProperty _immersiveXR;
5750
private SerializedProperty _subsampling;
58-
private SerializedProperty _spacewarp;
5951

6052
/// <inheritdoc/>
6153
public override void OnInspectorGUI()
@@ -67,7 +59,6 @@ public override void OnInspectorGUI()
6759
_immersiveXRLabel, _immersiveXR.boolValue);
6860
_subsampling.boolValue = EditorGUILayout.Toggle(
6961
_subsamplingLabel, _subsampling.boolValue);
70-
_spacewarp.boolValue = EditorGUILayout.Toggle(_spacewarpLabel, _spacewarp.boolValue);
7162
serializedObject.ApplyModifiedProperties();
7263

7364
EditorGUIUtility.labelWidth = 0f;
@@ -77,7 +68,6 @@ private void OnEnable()
7768
{
7869
_immersiveXR = serializedObject.FindProperty(_immersiveXRFieldName);
7970
_subsampling = serializedObject.FindProperty(_subsamplingFieldName);
80-
_spacewarp = serializedObject.FindProperty(_spacewarpFieldName);
8171
}
8272
}
8373
}

0 commit comments

Comments
 (0)