Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
## [1.10.0] - 2024-01-26

### Added
* Added `OpenXRSettings.VulkanAdditionalGraphicsQueue` property to request at startup an additional Vulkan graphics queue in devices that require it. The setting can be enabled through the Project settings UI and build code.
* Added `Optimize Buffer Discards (Vulkan)` feature setting option within MetaQuestFeature.
* Added a new optional validation rule to switch to use InputSystem.Controls.StickControl instead of Vector2Control for thumbsticks. StickControl allows more input options for thumbstick-based control, such as acting as both a combined 2D vector, two independent axes or a four-way Dpad with 4 independent buttons.

### Changed
* Updated project validation rule for Meta Quest Feature - "Select Oculus Touch Interaction Profile or Meta Quest Pro Touch Interaction Profile to pair with." from error to warning to allow other interaction profiles to be enabled as well, like eye gaze or palm pose.

### Fixed
* Fixed Meta XR `Space Warp` feature crashing issue when trying to access the depth swapchain.
* Fixed Meta XR `Space Warp` depth subimage imageArrayIndex setup wrong issue for multiview render mode.
* Fixed a bug where Palm Pose won't work if the Eye Gaze Interaction Profile is added to the project.
* Fixed "The type 'AnalyticsResult' is defined in an assembly that is not referenced" error thrown.
* Fixed UnitySwapchain destructor to completely destroy swapchains to avoid memory leak.
* Fixed OpenXR Settings UI to not render settings on platforms that aren't supported.
* Fixed Android manifest entries were added when the feature was not enabled.
  • Loading branch information
Unity Technologies committed Jan 26, 2024
1 parent fcd2b5d commit dc3a991
Show file tree
Hide file tree
Showing 172 changed files with 538 additions and 210 deletions.
30 changes: 24 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,29 @@ All notable changes to this package will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

# Notes
When updating the Changelog, please ensure we follow the standards for ordering headers as outlined here: [US-0039](https://standards.ds.unity3d.com/Standards/US-0039/). Specifically:
```
Under ## headers, ### \<type\> headers are listed in this order: Added, Changed, Deprecated, Removed, Fixed, Security
```
<!--
> **Notes**
> When updating the Changelog, please ensure we follow the standards for ordering headers as outlined here: [US-0039](https://standards.ds.unity3d.com/Standards/US-0039/). Specifically: Under ## headers, ### \<type\> headers are listed in this order: Added, Changed, Deprecated, Removed, Fixed, Security
-->

## [1.10.0] - 2024-01-26

### Added
* Added `OpenXRSettings.VulkanAdditionalGraphicsQueue` property to request at startup an additional Vulkan graphics queue in devices that require it. The setting can be enabled through the Project settings UI and build code.
* Added `Optimize Buffer Discards (Vulkan)` feature setting option within MetaQuestFeature.
* Added a new optional validation rule to switch to use InputSystem.Controls.StickControl instead of Vector2Control for thumbsticks. StickControl allows more input options for thumbstick-based control, such as acting as both a combined 2D vector, two independent axes or a four-way Dpad with 4 independent buttons.

### Changed
* Updated project validation rule for Meta Quest Feature - "Select Oculus Touch Interaction Profile or Meta Quest Pro Touch Interaction Profile to pair with." from error to warning to allow other interaction profiles to be enabled as well, like eye gaze or palm pose.

### Fixed
* Fixed Meta XR `Space Warp` feature crashing issue when trying to access the depth swapchain.
* Fixed Meta XR `Space Warp` depth subimage imageArrayIndex setup wrong issue for multiview render mode.
* Fixed a bug where Palm Pose won't work if the Eye Gaze Interaction Profile is added to the project.
* Fixed "The type 'AnalyticsResult' is defined in an assembly that is not referenced" error thrown.
* Fixed UnitySwapchain destructor to completely destroy swapchains to avoid memory leak.
* Fixed OpenXR Settings UI to not render settings on platforms that aren't supported.
* Fixed Android manifest entries were added when the feature was not enabled.

## [1.9.1] - 2023-10-19

Expand All @@ -29,7 +47,7 @@ Under ## headers, ### \<type\> headers are listed in this order: Added, Changed,
* Changed MockRuntime and its FeatureSet to public.

### Fixed
* Fixed incorect XR Validation rules after regenerating the OpenXR package settings asset.
* Fixed incorrect XR Validation rules after regenerating the OpenXR package settings asset.
* Fixed analytics code being called when disabled.
* Fixed latency issue with controller poses.
* Fixed an XR_ERROR_SESSION_NOT_RUNNING error if xrRequestExitSession is called when the session is not running.
Expand Down
2 changes: 1 addition & 1 deletion ConformanceAutomation/android.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ConformanceAutomation/android/arm64.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ConformanceAutomation/android/x64.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ConformanceAutomation/osx.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified ConformanceAutomation/osx/ConformanceAutomationExt.dylib
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ConformanceAutomation/universalwindows.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ConformanceAutomation/universalwindows/arm32.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ConformanceAutomation/universalwindows/arm64.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ConformanceAutomation/universalwindows/x64.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ConformanceAutomation/windows.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ConformanceAutomation/windows/x64.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified ConformanceAutomation/windows/x64/ConformanceAutomationExt.dll
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions Documentation~/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ Unity's OpenXR plug-in should work with any device that supports conformant Open

|**Runtime**|**Build target**|**Preferred Graphics API**|**Feature Parity**|**Known Limitations**|
|---|---|---|---|---|
|Windows Mixed Reality|Windows 64-bit|DX11|Full feature parity via [Mixed Reality OpenXR Plugin for Unity](https://docs.microsoft.com/en-us/windows/mixed-reality/develop/unity/openxr-getting-started)||
|HoloLens 2|UWP arm64|DX11|Full feature parity via [Mixed Reality OpenXR Plugin for Unity](https://docs.microsoft.com/en-us/windows/mixed-reality/develop/unity/openxr-getting-started)||
|Windows Mixed Reality|Windows 64-bit|DX11|Full feature parity via [Mixed Reality OpenXR Plugin for Unity](https://learn.microsoft.com/en-us/windows/mixed-reality/develop/unity/unity-development-wmr-overview)||
|HoloLens 2|UWP arm64|DX11|Full feature parity via [Mixed Reality OpenXR Plugin for Unity](https://learn.microsoft.com/en-us/windows/mixed-reality/develop/unity/unity-development-overview)||
|Oculus PC + Link|Windows 64-bit|DX11|HMD + Controllers|Oculus Integration package features not available|
|Meta Quest|Android arm64|Vulkan|HMD + Controllers via [Meta Quest Support Feature](./features/metaquest.md)|
|Magic Leap 2|Android x64|Vulkan|Full feature parity via [Magic Leap Unity Overview OpenXR](https://developer-docs.magicleap.cloud/docs/guides/unity/unity-overview-openxr/)||
|All other conformant runtimes (eg. SteamVR)|Windows 64-bit|DX11|HMD + Controllers|Given the unbounded combinations of possible hardware/software configurations, Unity is unable to test or guarantee that all configurations will work optimally.<br><br>SteamVR Plugin features not available|

To help the community as a whole, Unity will continue to submit any runtime issues, and contribute conformance tests and specification changes to the Khronos working group.
Expand All @@ -35,7 +36,7 @@ Additionally, you can access the current OpenXR Runtime through the scripting AP

## Considerations before porting to OpenXR

Unity does not yet provide out-of-the-box solutions to the following when using OpenXR, however there may be platform-specific plugins (eg. [Mixed Reality OpenXR Plugin for Unity](https://docs.microsoft.com/en-us/windows/mixed-reality/develop/unity/openxr-getting-started)) or third party solutions available:
Unity does not yet provide out-of-the-box solutions to the following when using OpenXR, however there may be platform-specific plugins or third party solutions available:

* Controller / hand models
* Finger tracking
Expand All @@ -58,7 +59,7 @@ See [Project configuration](xref:openxr-project-config) for additional informati

## Project validation

Project validation is a feature OpenXR has to assess configuration correctness of your project depending on the platform you are planning to build for. Unity will raise errors and warnings at build time if your project is not compatible with OpenXR.
Project validation is a feature the Unity OpenXR package has to assess configuration correctness of your project depending on the platform you are planning to build for. Unity will raise errors and warnings at build time if your project is not compatible with OpenXR.

For more information on how project validation works in OpenXR, see [Project validation](xref:openxr-project-config#project-validation).

Expand Down
16 changes: 14 additions & 2 deletions Editor/FeatureSupport/OpenXRFeatureBuildHooks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ namespace UnityEditor.XR.OpenXR.Features
/// <summary>
/// Inherit from this class to get callbacks to hook into the build process when your OpenXR Extension is enabled.
/// </summary>
#pragma warning disable 0618
public abstract class OpenXRFeatureBuildHooks : IPostGenerateGradleAndroidProject, IPostprocessBuildWithReport, IPreprocessBuildWithReport
#pragma warning restore 0618
#if XR_MGMT_4_4_0_OR_NEWER
, IAndroidManifestRequirementProvider
#endif
Expand Down Expand Up @@ -129,13 +131,23 @@ protected virtual void OnProcessBootConfigExt(BuildReport report, BootConfigBuil

#if XR_MGMT_4_4_0_OR_NEWER
/// <summary>
/// Called during build process when collecting requirements for Android Manifest. Implement this function to add, override or remove Android manifest entries.
/// Post process build step for checking if the hooks' related feature is enabled for Android builds If so, the hook can safely provide its Android manifest requirements.
/// </summary>
public virtual ManifestRequirement ProvideManifestRequirement()
{
return null;
if (!IsExtensionEnabled(BuildTarget.Android, BuildTargetGroup.Android))
return null;

return ProvideManifestRequirementExt();
}

/// <summary>
/// Called during build process when collecting requirements for Android Manifest. Implement this function to add, override or remove Android manifest entries.
/// </summary>
protected virtual ManifestRequirement ProvideManifestRequirementExt()
{
return null;
}
#endif
}
}
21 changes: 21 additions & 0 deletions Editor/OpenXRBuildProcessor.cs
Original file line number Diff line number Diff line change
@@ -1,18 +1,39 @@
using UnityEditor.Build.Reporting;
using UnityEditor.XR.Management;
using UnityEditor.XR.OpenXR.Features;
using UnityEngine.XR.OpenXR;

namespace UnityEditor.XR.OpenXR
{
internal class OpenXRBuildProcessor : XRBuildHelper<OpenXRSettings>
{
private const string kRequestAdditionalVulkanGraphicsQueue = "xr-request-additional-vulkan-graphics-queue";

public override string BuildSettingsKey => Constants.k_SettingsKey;

private readonly BootConfigBuilder _bootConfigBuilder = new BootConfigBuilder();

public override UnityEngine.Object SettingsForBuildTargetGroup(BuildTargetGroup buildTargetGroup)
{
EditorBuildSettings.TryGetConfigObject(Constants.k_SettingsKey, out OpenXRPackageSettings packageSettings);
if (packageSettings == null)
return null;
return packageSettings.GetSettingsForBuildTargetGroup(buildTargetGroup);
}

public override void OnPreprocessBuild(BuildReport report)
{
base.OnPreprocessBuild(report);

_bootConfigBuilder.ReadBootConfig(report);

#if UNITY_STANDALONE_WIN || UNITY_ANDROID
var settings = OpenXREditorSettings.Instance;
if (settings != null)
{
_bootConfigBuilder.SetBootConfigBoolean(kRequestAdditionalVulkanGraphicsQueue, settings.VulkanAdditionalGraphicsQueue);
}
#endif
}
}
}
17 changes: 17 additions & 0 deletions Editor/OpenXREditorSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,23 @@ struct BuildTargetFeatureSets
Dictionary<BuildTargetGroup, BuildTargetFeatureSets> selectedFeatureSets = new Dictionary<BuildTargetGroup, BuildTargetFeatureSets>();


[SerializeField] bool m_vulkanAdditionalGraphicsQueue = false;

/// <summary>
/// If enabled, when the application begins it will request an additional Vulkan graphics queue.
/// </summary>
public bool VulkanAdditionalGraphicsQueue
{
get
{
return m_vulkanAdditionalGraphicsQueue;
}
set
{
m_vulkanAdditionalGraphicsQueue = value;
}
}

public void OnBeforeSerialize()
{
Keys.Clear();
Expand Down
25 changes: 24 additions & 1 deletion Editor/PackageSettingsEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using UnityEngine;
using UnityEngine.XR.OpenXR;
using UnityEditor.XR.OpenXR.Features;
using UnityEngine.Rendering;

namespace UnityEditor.XR.OpenXR
{
Expand All @@ -11,6 +12,9 @@ internal class PackageSettingsEditor : UnityEditor.Editor
{
OpenXRFeatureEditor m_FeatureEditor = null;
Vector2 scrollPos = Vector2.zero;
#if XR_MGMT_3_2_0_OR_NEWER
OpenXRManagementSettings managementSettings = new();
#endif

#if XR_MGMT_4_1_0_OR_OLDER
static PackageSettingsEditor s_LastPackageSettingsEditor = null;
Expand All @@ -21,6 +25,7 @@ static class Content
public const float k_Space = 15.0f;

public static readonly GUIContent k_renderModeLabel = new GUIContent("Render Mode");
public static readonly GUIContent k_vulkanAdditionalGraphicsQueue = new GUIContent("Additional Graphics Queue (Vulkan)");

public static readonly GUIContent[] k_renderModeOptions = new GUIContent[2]
{
Expand Down Expand Up @@ -70,6 +75,14 @@ public override void OnInspectorGUI()
var buildTargetGroup = EditorGUILayout.BeginBuildTargetSelectionGrouping();
OpenXRProjectValidationRulesSetup.SetSelectedBuildTargetGroup(buildTargetGroup);

#if XR_MGMT_3_2_0_OR_NEWER
if (!managementSettings.metadata.loaderMetadata[0].supportedBuildTargets.Contains(buildTargetGroup))
{
EditorGUILayout.EndBuildTargetSelectionGrouping();
return;
}
#endif

OpenXRPackageSettings settings = serializedObject.targetObject as OpenXRPackageSettings;

scrollPos = EditorGUILayout.BeginScrollView(scrollPos);
Expand All @@ -81,6 +94,9 @@ public override void OnInspectorGUI()
var openXrSettings = settings.GetSettingsForBuildTargetGroup(buildTargetGroup);
var serializedOpenXrSettings = new SerializedObject(openXrSettings);

var openXrEditorSettings = OpenXREditorSettings.Instance;
var serializedOpenXrEditorSettings = new SerializedObject(openXrEditorSettings);

EditorGUIUtility.labelWidth = 200;

int newRenderMode;
Expand All @@ -101,12 +117,19 @@ public override void OnInspectorGUI()

GUILayout.EndHorizontal();

DrawPropertiesExcluding(serializedOpenXrSettings, "m_Script", "m_renderMode", "m_symmetricProjection");
DrawPropertiesExcluding(serializedOpenXrSettings, "m_Script", "m_renderMode", "m_symmetricProjection", "m_optimizeBufferDiscards", "m_vulkanAdditionalGraphicsQueue");
if (buildTargetGroup == BuildTargetGroup.Android || buildTargetGroup == BuildTargetGroup.Standalone)
{
serializedOpenXrEditorSettings.FindProperty("m_vulkanAdditionalGraphicsQueue").boolValue =
EditorGUILayout.Toggle(Content.k_vulkanAdditionalGraphicsQueue, openXrEditorSettings.VulkanAdditionalGraphicsQueue);
}

EditorGUIUtility.labelWidth = 0;

if (serializedOpenXrSettings.hasModifiedProperties)
serializedOpenXrSettings.ApplyModifiedProperties();
if (serializedOpenXrEditorSettings.hasModifiedProperties)
serializedOpenXrEditorSettings.ApplyModifiedProperties();

if (buildTargetGroup == BuildTargetGroup.Standalone)
{
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
com.unity.xr.openxr copyright © 2023 Unity Technologies ApS
com.unity.xr.openxr copyright © 2024 Unity Technologies ApS

Source code of the package is licensed under the Unity Companion License (see https://unity3d.com/legal/licenses/unity_companion_license); otherwise licensed under the Unity Package Distribution License (see https://unity3d.com/legal/licenses/Unity_Package_Distribution_License ).

Expand Down
Loading

0 comments on commit dc3a991

Please sign in to comment.