Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
## [1.2.2] - 2021-06-01
* Fixed a bug when using SteamVR runtime that would cause the view to stop rendering and input to stop tracking if the main thread stalled for too long.
* Fixed bug with feature sets that could cause the XR Management check box to be out of sync with the checkbox on the OpenXR Settings page.
* Fixed bug with HTC Vive controller profile that caused the `aim` and `grip` poses to be identical.
* Renamed `Feature Sets` to `Feature Groups` in the UI.
* Removed unnecessary build hook for `EyeGaze` that was causing incorrect capabilities to be set on `HoloLens2`.
* Editor runtime override will no longer change the runtime for standalone builds executed using `Build and Run`.
  • Loading branch information
Unity Technologies committed Jun 1, 2021
1 parent 8ee783c commit fc2c8fa
Show file tree
Hide file tree
Showing 127 changed files with 622 additions and 453 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ 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.2.2] - 2021-06-01
* Fixed a bug when using SteamVR runtime that would cause the view to stop rendering and input to stop tracking if the main thread stalled for too long.
* Fixed bug with feature sets that could cause the XR Management check box to be out of sync with the checkbox on the OpenXR Settings page.
* Fixed bug with HTC Vive controller profile that caused the `aim` and `grip` poses to be identical.
* Renamed `Feature Sets` to `Feature Groups` in the UI.
* Removed unnecessary build hook for `EyeGaze` that was causing incorrect capabilities to be set on `HoloLens2`.
* Editor runtime override will no longer change the runtime for standalone builds executed using `Build and Run`.

## [1.2.0] - 2021-05-06

* Enabled Android build target for Oculus Quest via the `Oculus Quest Support` feature.
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.

20 changes: 10 additions & 10 deletions Documentation~/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ OpenXR is an extensible API that can be extended with new features. To facilitat

You can manage features from the **Project Settings > XR Plug-in Management > OpenXR** window.

To enable or disable a feature, select or clear the checkbox next to it. Unity doesn't execute disabled features at runtime, and does't deploy any of the feature's native libraries with the Player build. To configure additional build-time properties specific to each feature, click the gear icon to the right of the feature.
To enable or disable a feature, select or clear the checkbox next to it. Unity doesn't execute disabled features at runtime, and doesn't deploy any of the feature's native libraries with the Player build. To configure additional build-time properties specific to each feature, click the gear icon to the right of the feature.

All of the information in this window is populated via the `OpenXRFeatureAttribute` described below.

**Feature sets** group a number of different **features** together to allow you to configure them simultaneously, which might offer a better development experience. For more information, see the [Defining a feature set](#defining-a-feature-set) section on this page.
**Feature Groups** group a number of different **features** together to allow you to configure them simultaneously, which might offer a better development experience. For more information, see the [Defining a feature group](#defining-a-feature-group) section on this page.

## Defining a feature

Expand Down Expand Up @@ -47,30 +47,30 @@ A feature must also provide an `OpenXRFeature` attribute when running in the Edi

Unity uses this information at build time, either to build the Player or to display it to the user in the UI.

## Defining a feature set
## Defining a feature group

Unity OpenXR allows you to define a feature set you can use to enable or disable a group of features at the same time. This way, you don't need to access the **Feature** section in **Project Settings > XR Plug-in Management > OpenXR** window to enable or disable features.
Unity OpenXR allows you to define a feature group you can use to enable or disable a group of features at the same time. This way, you don't need to access the **Feature** section in **Project Settings > XR Plug-in Management > OpenXR** window to enable or disable features.

Declare a feature set through the definition of one or more `OpenXRFeatureSetAttribute` declarations in your code. You can place the attribute anywhere because the feature set functionality only depends on the attribute existing and not on the actual class it's declared on.
Declare a feature group through the definition of one or more `OpenXRFeatureSetAttribute` declarations in your code. You can place the attribute anywhere because the feature group functionality only depends on the attribute existing and not on the actual class it's declared on.

```c#
[OpenXRFeatureSet(
FeatureIds = new string[] { // The list of features that this feature set is defined for.
FeatureIds = new string[] { // The list of features that this feature group is defined for.
EyeGazeInteraction.featureId,
KHRSimpleControllerProfile.featureId,
"com.mycompany.myprovider.mynewfeature",
},
UiName = "Feature_Set_Name",
Description = "Feature set that allows for setting up the best environment for My Company's hardware.",
// Unique ID for this feature set
FeatureSetId = "com.mycompany.myprovider.mynewfeatureset",
Description = "Feature group that allows for setting up the best environment for My Company's hardware.",
// Unique ID for this feature group
FeatureSetId = "com.mycompany.myprovider.mynewfeaturegroup",
SupportedBuildTargets = new BuildTargetGroup[]{ BuildTargetGroup.Standalone, BuildTargetGroup.Android }
)]
class MyCompanysFeatureSet
{}
```

You can configure feature sets in the **XR Plug-in Management** plug-in selection window. When you select the **OpenXR** plug-in from this window, the section under the plug-in displays the sets of features available. Not all feature sets are configurable. Some require you to install third-party definitions. The window displays information on where to get the required packages if needed.
You can configure feature groups in the **XR Plug-in Management** plug-in selection window. When you select the **OpenXR** plug-in from this window, the section under the plug-in displays the groups of features available. Not all feature groups are configurable. Some require you to install third-party definitions. The window displays information on where to get the required packages if needed.

### Enabling OpenXR spec extension strings

Expand Down
Binary file modified Documentation~/images/features-with-issues.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Documentation~/images/openxr-features.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 8 additions & 8 deletions Documentation~/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Unity does not yet provide out-of-the-box solutions to the following when using
To enable OpenXR in your project, follow the steps below:

1. Open the **Project Settings** window (menu: **Edit > Project Settings**), and select **XR Plug-in Management**.
2. Enable the **OpenXR** option and any **Feature Sets** for the runtimes you intend to target.
2. Enable the **OpenXR** option and any **Feature Groups** for the runtimes you intend to target.
3. In the **OpenXR > Features** tab, select the interaction profile of the device you are testing with.
4. In the **OpenXR** tab, make sure the current active runtime is set to the hardware you are testing with. See the [Per-platform setttings](#per-platform-settings) section on this page for more information.

Expand All @@ -58,7 +58,7 @@ Features might introduce new validation steps. For more information, refer to sp
Unity reports validation issues in the following locations:

* XR Plug-in Management window: Icon next to the OpenXR loader.
* Features pane: Icon next to the feature set containing the feature that is reporting a validation issue.
* Features pane: Icon next to the feature group containing the feature that is reporting a validation issue.
* Features pane: Icon next to each feature that is reporting a validation issue.
* Console window, as the result of a build: Validation errors cause the build to terminate. Validation warnings do not terminate the build.

Expand Down Expand Up @@ -186,11 +186,11 @@ Features are a collection of Unity Assets that can be distributed through the Pa

![openxr-features-ui](images/openxr-features.png)

You can enable, disable, and configure features from the **XR Plug-in Management > OpenXR** window. There are two main sections: **Interaction Profiles** and **Feature Sets** .
You can enable, disable, and configure features from the **XR Plug-in Management > OpenXR** window. There are two main sections: **Interaction Profiles** and **Feature Groups** .

**Interaction Profiles** are a specific type of feature that provide support for various controllers and input devices within OpenXR. Generally you would add **Interaction Profiles** for each device that you are able to test with and intend to support.

Feature sets are a grouping of features that a provider defines. Use them to easily select and group a number of features. Selecting a feature set in the left pane filters the set of features on the right to only the features that the set contains. You can then enable or disable these features individually.
Feature groups are a grouping of features that a provider defines. Use them to easily select and group a number of features. Selecting group in the left pane filters the set of features on the right to only the features that the set contains. You can then enable or disable these features individually.

Some features will will have links to documentation following their name as well as a gear icon to the right for additional configuration.

Expand Down Expand Up @@ -236,9 +236,9 @@ You can also access all the settings in the **Features** window through script.
feature.enabled = ...;
```

#### Iterating over all feature sets
#### Iterating over all feature groups

Feature sets are an Editor-only concept and as such can only be accessed in the Unity Editor.
Feature groups are an Editor-only concept and as such can only be accessed in the Unity Editor.

```c#
#if UNITY_EDITOR
Expand All @@ -252,9 +252,9 @@ Feature sets are an Editor-only concept and as such can only be accessed in the
#endif
```

#### Iterating over features in a feature set
#### Iterating over features in a feature group

Feature sets are an Editor-only concept and as such can only be accessed in the Unity Editor.
Feature groups are an Editor-only concept and as such can only be accessed in the Unity Editor.

```c#
#if UNITY_EDITOR
Expand Down
5 changes: 3 additions & 2 deletions Editor/FeatureSupport/OpenXRFeatureEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ static class Styles
static class Content
{
public static readonly GUIContent k_HelpIcon = EditorGUIUtility.IconContent("_Help");
public static readonly GUIContent k_SettingsIcon = EditorGUIUtility.IconContent("d_Settings");
public static readonly GUIContent k_SettingsIcon = EditorGUIUtility.IconContent("Settings");

public static readonly GUIContent k_Settings = new GUIContent("", k_SettingsIcon.image, "Open settings editor for this feature.");
public static readonly GUIContent k_InteractionProfilesTitle = new GUIContent("Interaction Profiles");
Expand Down Expand Up @@ -312,7 +312,7 @@ void DrawSelectionList()

EditorGUILayout.BeginVertical(GUILayout.Width(Styles.k_DefaultSelectionWidth), GUILayout.ExpandWidth(true));
{
EditorGUILayout.LabelField("Feature Sets", Styles.s_FeatureSetTitleLable);
EditorGUILayout.LabelField("OpenXR Feature Groups", Styles.s_FeatureSetTitleLable);

EditorGUILayout.BeginVertical(Styles.s_SelectionBackground, GUILayout.ExpandHeight(true));
{
Expand All @@ -335,6 +335,7 @@ void DrawSelectionList()
{
item.wasChanged = true;
item.isEnabled = newToggleState;
OpenXREditorSettings.Instance.SetFeatureSetSelected(activeBuildTarget, item.featureSetId, item.isEnabled);
OpenXRFeatureSetManager.SetFeaturesFromEnabledFeatureSets(activeBuildTarget);
mustInitializeFeatures = true;
}
Expand Down
26 changes: 1 addition & 25 deletions Editor/FeatureSupport/OpenXRFeatureSetManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -178,30 +178,6 @@ static void FillKnownFeatureSets(bool addTestFeatureSet = false)
}
}

static bool AllFeaturesEnabled(string[] featureIds, BuildTargetGroup buildTargetGroup)
{
if (featureIds == null)
return false;

var allFeatureInfo = FeatureHelpersInternal.GetAllFeatureInfo(buildTargetGroup);
if (allFeatureInfo == null || allFeatureInfo.Features.Count == 0)
return false;

bool ret = true;
bool found = false;
foreach(var featureInfo in allFeatureInfo.Features)
{
if (Array.IndexOf(featureIds, featureInfo.Attribute.FeatureId) > -1)
{
found = true;
ret &= featureInfo.Feature.enabled;
}
}

ret &= found;
return ret;
}

/// <summary>
/// Initializes all currently known feature sets. This will do two initialization passes:
///
Expand Down Expand Up @@ -245,7 +221,7 @@ internal static void InitializeFeatureSets(bool addTestFeatureSet)
}

var newFeatureSet = new FeatureSetInfo(){
isEnabled = AllFeaturesEnabled(featureSetAttr.RequiredFeatureIds, buildTargetGroup),
isEnabled = OpenXREditorSettings.Instance.IsFeatureSetSelected(buildTargetGroup, featureSetAttr.FeatureSetId),
name = featureSetAttr.UiName,
description = featureSetAttr.Description,
featureSetId = featureSetAttr.FeatureSetId,
Expand Down
8 changes: 0 additions & 8 deletions Editor/Input.meta

This file was deleted.

85 changes: 0 additions & 85 deletions Editor/Input/OpenXREyeTrackingFeatureBuildHooks.cs

This file was deleted.

11 changes: 0 additions & 11 deletions Editor/Input/OpenXREyeTrackingFeatureBuildHooks.cs.meta

This file was deleted.

Loading

0 comments on commit fc2c8fa

Please sign in to comment.