Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
## [1.5.3] - 2022-09-18
### Fixed
* Fixed `XRInputSubsystem.TryGetBoundaryPoints` returning inaccurate values. If you have guardian/boundary setup in the headset, `TryGetBoundaryPoints` will return a List<Vector3> of size 4 representing the four vertices of the Play Area rectangle, which is centered at the origin and edges corresponding to the X and Z axes of the provided space. Not all systems or spaces may support boundaries.
* Fixed an issue that controllers position not getting updated and stuck to the floor level when Oculus Integration Asset installed in the project.
* Fixed an issue that OpenXR libraries were included in build when OpenXR SDK is not enabled.
* Improved domain reload performance by removing unnecessary checks when entering Playmode.

### Updated
* Updated Input System dependency to 1.4.2.

### Added
* Added support for Android cross-vendor loader.
  • Loading branch information
Unity Technologies committed Sep 18, 2022
1 parent 143351d commit d8f8fe0
Show file tree
Hide file tree
Showing 150 changed files with 1,227 additions and 343 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,19 @@ 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).

## [1.5.3] - 2022-09-18
### Fixed
* Fixed `XRInputSubsystem.TryGetBoundaryPoints` returning inaccurate values. If you have guardian/boundary setup in the headset, `TryGetBoundaryPoints` will return a List<Vector3> of size 4 representing the four vertices of the Play Area rectangle, which is centered at the origin and edges corresponding to the X and Z axes of the provided space. Not all systems or spaces may support boundaries.
* Fixed an issue that controllers position not getting updated and stuck to the floor level when Oculus Integration Asset installed in the project.
* Fixed an issue that OpenXR libraries were included in build when OpenXR SDK is not enabled.
* Improved domain reload performance by removing unnecessary checks when entering Playmode.

### Updated
* Updated Input System dependency to 1.4.2.

### Added
* Added support for Android cross-vendor loader.

## [1.5.1] - 2022-08-11
### Fixed
* Fixed compilation errors on Game Core platforms where `ENABLE_VR` is not currently defined. Requires Input System 1.4.0 or newer.
Expand Down
2 changes: 1 addition & 1 deletion ConformanceAutomation/ConformanceAutomationFeature.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace UnityEngine.XR.OpenXR.Features.ConformanceAutomation
#if UNITY_EDITOR
[OpenXRFeature(UiName = "Conformance Automation",
Hidden = true,
BuildTargetGroups = new []{UnityEditor.BuildTargetGroup.Standalone, UnityEditor.BuildTargetGroup.Android, UnityEditor.BuildTargetGroup.WSA, },
BuildTargetGroups = new []{UnityEditor.BuildTargetGroup.Standalone, UnityEditor.BuildTargetGroup.Android, UnityEditor.BuildTargetGroup.WSA },
Company = "Unity",
Desc = "The XR_EXT_conformance_automation allows conformance test and runtime developers to provide hints to the underlying runtime as to what input the test is expecting. This enables runtime authors to automate the testing of their runtime conformance.",
DocumentationLink = Constants.k_DocumentationURL,
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/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.

14 changes: 12 additions & 2 deletions Documentation~/features/oculusquest.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Oculus Quest Support

In order to deploy to Oculus Quest, enable the Oculus Quest Support feature on the Android build target. Android apks that are produced with this feature enabled will be able to run on the Quest family of devices.
In order to deploy to Oculus Quest, enable the Oculus Quest Support feature on the Android build target:

For details on what happens when this feature is enabled, see [Oculus' OpenXR Mobile SDK](https://developer.oculus.com/downloads/package/oculus-openxr-mobile-sdk/)
1. Open the Project Settings window (menu: **Edit > Project Settings**).
2. Select the **XR Plug-in Management** from the list of settings on the left.
3. If necessary, enable **OpenXR** in the list of **Plug-in Providers**. Unity installs the OpenXR plug-in, if not already installed.
4. Select the OpenXR settings page under XR Plug-in Management.
5. Add the **Oculus Touch Controller Profile** to the **Interaction Profiles** list. (You can have multiple profiles enabled in the list, the OpenXR chooses the one to use based on the current device at runtime.)
6. Enable **Oculus Quest Support** under **OpenXR Feature Groups**.

The Android apks that are produced with Quest support enabled can be run on the Quest family of devices.
See the [XR](xref:XR) section of the Unity Manual for more information about developing VR games and applications.

For information about Meta company's Oculus support development roadmap, see [Oculus All In on OpenXR: Deprecates Proprietary APIs](https://developer.oculus.com/blog/oculus-all-in-on-openxr-deprecates-proprietary-apis/).
2 changes: 1 addition & 1 deletion Documentation~/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ The most important part of the diagnostic log is the section marked `==== OpenXR
## Known issues

* For projects targeting HoloLens 2 that are using Out of the Box Unity OpenXR support, **Project Settings - &gt; Player - &gt; Resolution and Presentation - &gt; Run in Background** must be enabled. For projects that are using the Microsoft OpenXR extended support package this is not required.
* An issue with an invalid stage space during startup may cause problems with the XR Rig component from the `com.unity.xr.interaction.toolkit` package, or the camera offset component in the `com.unity.xr.legacyinputhelpers` package. These packages will be updated shortly to contain fixes for this issue. Until then the workaround is to use the `Floor` Device Tracking Option setting.
* An issue with an invalid stage space during startup may cause problems with the XR Origin component from the `com.unity.xr.interaction.toolkit` package, or the camera offset component in the `com.unity.xr.legacyinputhelpers` package. These packages will be updated shortly to contain fixes for this issue. Until then the workaround is to use the `Floor` Device Tracking Option setting.

## Upgrading a project to use OpenXR

Expand Down
4 changes: 2 additions & 2 deletions Documentation~/input.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ For information on how to configure Unity to use OpenXR input, see the [Getting

## Overview

Initially, Unity will provide a controller-based approach to interfacing with OpenXR. This will allow existing games and applications that are using the Unity's [Input System](https://docs.unity3d.com/Packages/[email protected]/manual/) or the [Feature API](https://docs.unity3d.com/Manual/xr_input.html) to continue to use their existing input mechanisms.
Initially, Unity will provide a controller-based approach to interfacing with OpenXR. This will allow existing games and applications that are using Unity's [Input System](https://docs.unity3d.com/Packages/[email protected]/manual/) or the [Feature API](https://docs.unity3d.com/Manual/xr_input.html) to continue to use their existing input mechanisms.

The Unity OpenXR package provides a set of controller layouts for various devices that you can bind to your actions when using the Unity Input System. For more information, see the [Interaction profile features](./index.md#interaction-profile-features) section.

Expand Down Expand Up @@ -195,7 +195,7 @@ The HMD position reported by Unity when using OpenXR is calculated from the curr
The Unity `Device Tracking Origin` is mapped to `Local Space`.
The Unity `Floor Tracking Origin` is mapped to `Stage Space`.

By default, Unity attempts to attach the `Stage Space` where possible. To help manage the different tracking origins, use the `XR Rig` from the XR Interaction Package, or the `Camera Offset` component from the Legacy Input Helpers package.
By default, Unity attempts to attach the `Stage Space` where possible. To help manage the different tracking origins, use the `XR Origin` from the XR Interaction Package, or the `Camera Offset` component from the Legacy Input Helpers package.

### Interaction bindings

Expand Down
14 changes: 7 additions & 7 deletions Documentation~/project-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ The **XR Plug-in Management** settings page displays a tab for each platform bui

To enable OpenXR:

1. Open the **Player Settings** window (menu: **Edit &gt; Player Settings**).
1. Open the **Project Settings** window (menu: **Edit &gt; Project Settings**).
2. Select **XR Plug-in Management** to view the plug-in management settings.
3. Select the tab for a platform build target to view the settings for that target.
4. Enable the **OpenXR** option in the **Plug-in Providers** list.
Expand All @@ -55,7 +55,7 @@ Some features are organized as a *feature group*. You can enable a feature group

To enable an OpenXR feature:

1. Open the **Player Settings** window (menu: **Edit &gt; Player Settings**).
1. Open the **Project Settings** window (menu: **Edit &gt; Project Settings**).
2. Click **XR Plug-in Management** to expand the plug-in section (if necessary).
3. Select **OpenXR** in the list of XR plug-ins.
4. Select the tab for a platform build target to view the features for that target.
Expand Down Expand Up @@ -83,7 +83,7 @@ The **Render Mode** determines how OpenXR renders stereo graphics. Different plu

To set the render mode:

1. Open the **Player Settings** window (menu: **Edit &gt; Player Settings**).
1. Open the **Project Settings** window (menu: **Edit &gt; Project Settings**).
2. Click **XR Plug-in Management** to expand the plug-in section (if necessary).
3. Select **OpenXR** in the list of XR plug-ins.
4. Select the tab for a platform build target to view the features for that target.
Expand Down Expand Up @@ -116,7 +116,7 @@ A reasonable rule of thumb to use when choosing a setting is:

To set the depth submission mode:

1. Open the **Player Settings** window (menu: **Edit &gt; Player Settings**).
1. Open the **Project Settings** window (menu: **Edit &gt; Project Settings**).
2. Click **XR Plug-in Management** to expand the plug-in section (if necessary).
3. Select **OpenXR** in the list of XR plug-ins.
4. Select the tab for a platform build target to view the features for that target.
Expand All @@ -134,7 +134,7 @@ By default, Unity uses the OpenXR runtime that is setup as the active runtime fo
To set the OpenXR runtime to use in Play mode:

1. Open the **Player Settings** window (menu: **Edit &gt; Player Settings**).
1. Open the **Project Settings** window (menu: **Edit &gt; Project Settings**).
2. Click **XR Plug-in Management** to expand the plug-in section (if necessary).
3. Select **OpenXR** in the list of XR plug-ins.
4. Select the Mac, Windows, Linux settings (PC) tab.
Expand All @@ -160,7 +160,7 @@ When using an OpenXR plug-in, you must specify which interaction profile to use.

To add an OpenXR interaction profile:

1. Open the **Player Settings** window (menu: **Edit &gt; Player Settings**).
1. Open the **Project Settings** window (menu: **Edit &gt; Project Settings**).
2. Click **XR Plug-in Management** to expand the plug-in section (if necessary).
3. Select **OpenXR** in the list of XR plug-ins.
4. In the **Interaction Profiles** section, click the **+** button to add a profile.
Expand All @@ -177,7 +177,7 @@ When you use the OpenGL graphics API, you must set the Unity Editor to use the l

To change the color space:

1. Open the **Player Settings** window (menu: **Edit &gt; Player Settings**).
1. Open the **Project Settings** window (menu: **Edit &gt; Project Settings**).
2. Select the **Player** settings category.
3. Scroll to the **Other Settings** section. (Click **Other Settings** to open the section, if necessary.)
4. Under the **Rendering** area, choose a **Color Space**.
Expand Down
19 changes: 7 additions & 12 deletions Editor/BuildHelperUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,24 +38,19 @@ public static XRGeneralSettings MakeSureXRGeneralSettingsExists(BuildTargetGroup
{
string searchText = "t:XRGeneralSettings";
string[] assets = AssetDatabase.FindAssets(searchText);
if (assets.Length > 0)
for (int i = 0; i < assets.Length; ++i)
{
string path = AssetDatabase.GUIDToAssetPath(assets[0]);
string path = AssetDatabase.GUIDToAssetPath(assets[i]);
var allSettings = AssetDatabase.LoadAssetAtPath(path, typeof(XRGeneralSettingsPerBuildTarget)) as XRGeneralSettingsPerBuildTarget;
EditorBuildSettings.AddConfigObject(XRGeneralSettings.k_SettingsKey, allSettings, true);
if (allSettings != null)
{
EditorBuildSettings.AddConfigObject(XRGeneralSettings.k_SettingsKey, allSettings, true);
break;
}
}
}

return settings;
}

static BuildHelperUtils()
{
EditorApplication.playModeStateChanged += (state) =>
{
if (state == PlayModeStateChange.ExitingEditMode)
MakeSureXRGeneralSettingsExists(BuildTargetGroup.Standalone);
};
}
}
}
17 changes: 14 additions & 3 deletions Editor/FeatureSupport/OpenXRChooseRuntimeLibraries.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Linq;
using UnityEditor.Build;
using UnityEditor.Build.Reporting;
using UnityEngine.XR.OpenXR;

namespace UnityEditor.XR.OpenXR.Features
{
Expand Down Expand Up @@ -72,6 +73,8 @@ private static string AssetPathToAbsolutePath(string assetPath)

public void OnPreprocessBuild(BuildReport report)
{
var enabled = BuildHelperUtils.HasLoader(report.summary.platformGroup, typeof(OpenXRLoaderBase));

var extensions = FeatureHelpersInternal.GetAllFeatureInfo(report.summary.platformGroup);

// Keep set of seen plugins, only disable plugins that haven't been seen.
Expand All @@ -83,22 +86,30 @@ public void OnPreprocessBuild(BuildReport report)
{
if (!importer.GetCompatibleWithPlatform(report.summary.platform))
continue;
bool loader = false;
if (importer.assetPath.Contains("openxr_loader"))
{
loader = true;
if (extensions.CustomLoaderBuildTargets?.Contains(report.summary.platform) ?? false)
importer.SetIncludeInBuildDelegate(path => false);
else
importer.SetIncludeInBuildDelegate(path => true);
importer.SetIncludeInBuildDelegate(path => enabled);
}

if (importer.assetPath.Contains("UnityOpenXR"))
{
importer.SetIncludeInBuildDelegate(path => enabled);
}

var root = Path.GetDirectoryName(importer.assetPath);
foreach (var extInfo in extensions.Features)
{
if (root != null && root.Contains(extInfo.PluginPath))
{
if (extInfo.Feature.enabled)
if (extInfo.Feature.enabled &&
(!loader || (extInfo.Attribute.CustomRuntimeLoaderBuildTargets?.Contains(report.summary.platform) ?? false)))
{
importer.SetIncludeInBuildDelegate(path => true);
importer.SetIncludeInBuildDelegate(path => enabled);
}
else if (!seenPlugins.Contains(importer.assetPath))
{
Expand Down
Loading

0 comments on commit d8f8fe0

Please sign in to comment.