Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
## [1.7.0] - 2023-02-21

### Fixed
* Fixed - Meta builds now don't include Bluetooth permissions in Android manifest by default when using Microphone class in script code.
* Fixed crash in OpenXR runtime debugger when cache size is set to 0.
* Fixed OpenXR project validation to check for correct versions of OpenGLES in Unity 2023 and up.
* Fixed crash when runtime reports an invalid view configuration from xrWaitFrame.
* Fixed - OpenXR plugin will only look up functions from supported and enabled extensions.
* Fixed GPU selection in multi-GPU scenarios.

### Updated
* Updated documentation for the Meta Quest feature.

### Added
* Added API `OpenXRRuntime.retryInitializationOnFormFactorErrors` to retry xrGetSystem during initialization if xrGetSystem returns a form factor error.
* Enable XR_META_performance_metrics. This enables performance stats for Meta Quest devices on OpenXR.
* Add class MetaQuestTouchProControllerProfile.QuestProTouchController new interaction profile to support Meta Quest pro controllers.
* Added ability for OpenXRFeature derived classes to add Awake() functions.
* Added API `OpenXRInput.GetActionIsActive` to check whether an InputAction has any bindings which are currently active.
* Added API `OpenXRInput.GetActionHandle` to get the action handle of an InputAction and returns 0 if not found.

## [1.6.1-preview.1] - 2022-12-01
  • Loading branch information
Unity Technologies committed Feb 21, 2023
1 parent 3ca8bb9 commit 6c7d016
Show file tree
Hide file tree
Showing 138 changed files with 2,148 additions and 149 deletions.
31 changes: 27 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,35 @@ 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.7.0] - 2023-02-21

### Fixed
* Fixed - Meta builds now don't include Bluetooth permissions in Android manifest by default when using Microphone class in script code.
* Fixed crash in OpenXR runtime debugger when cache size is set to 0.
* Fixed OpenXR project validation to check for correct versions of OpenGLES in Unity 2023 and up.
* Fixed crash when runtime reports an invalid view configuration from xrWaitFrame.
* Fixed - OpenXR plugin will only look up functions from supported and enabled extensions.
* Fixed GPU selection in multi-GPU scenarios.

### Updated
* Updated documentation for the Meta Quest feature.

### Added
* Added API `OpenXRRuntime.retryInitializationOnFormFactorErrors` to retry xrGetSystem during initialization if xrGetSystem returns a form factor error.
* Enable XR_META_performance_metrics. This enables performance stats for Meta Quest devices on OpenXR.
* Add class MetaQuestTouchProControllerProfile.QuestProTouchController new interaction profile to support Meta Quest pro controllers.
* Added ability for OpenXRFeature derived classes to add Awake() functions.
* Added API `OpenXRInput.GetActionIsActive` to check whether an InputAction has any bindings which are currently active.
* Added API `OpenXRInput.GetActionHandle` to get the action handle of an InputAction and returns 0 if not found.

## [1.6.1-preview.1] - 2022-12-01

## [1.6.0] - 2022-11-29
### Fixed
* Fixed black game window issue when building a URP project.
* Fixed `InputDevice.TryGetHapticCapabilities` always return True with OpenXR.
* Fixed repeated warnings for failed to restart OpenXR when no HMD is attached.
* Fixed invalid pose values got populated when tracked flags are invalid.
* Fixed issue where game window would show as black in URP.
* Fixed `InputDevice.TryGetHapticCapabilities` always returning True with OpenXR.
* Fixed repeated "Failed to restart OpenXR" warnings when no HMD is attached.
* Fixed invalid pose values getting populated when tracked flags are invalid.
* Fixed XR_SPACE_BOUNDS_UNAVAILABLE return code marked as Error in the log.

### Updated
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.

2 changes: 1 addition & 1 deletion Documentation~/TableOfContents.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
* [About Unity OpenXR](index.md)
* [Project Configuration](project-configuration.md)
* [OpenXR Features](features.md)
* [Oculus Quest Support](features/oculusquest.md)
* [Meta Quest Support](features/metaquest.md)
* [OpenXR Input](input.md)
* [Microsoft Mixed Reality Motion Controller Profile](features/microsoftmotioncontrollerprofile.md)
* [Oculus Touch Controller Profile](features/oculustouchcontrollerprofile.md)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Oculus Quest Support
# Meta Quest Support

In order to deploy to Oculus Quest, enable the Oculus Quest Support feature on the Android build target:
In order to deploy to Meta Quest, enable the Meta Quest Support feature on the Android build target:

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**.
6. Enable **Meta 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.
Expand Down
41 changes: 41 additions & 0 deletions Documentation~/features/metaquesttouchprocontrollerprofile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Meta Quest Pro Touch Controller Profile

Enables the OpenXR interaction profile for Meta Quest Pro controllers and exposes the `<QuestProTouchController>` device layout within the [Unity Input System](https://docs.unity3d.com/Packages/[email protected]/manual/).

## Available controls

| OpenXR Path | Unity Control Name | Type |
|----|----|----|
|`/input/thumbstick`| thumbstick | Vector2 |
|`/input/squeeze/value`| grip | Float |
|`/input/squeeze/value`| gripPressed | Float ( float cast to boolean) |
|`/input/menu/click`| menu (Left Hand Only)| Boolean |
|`/input/system/click`| menu (Right Hand Only)| Boolean |
|`/input/a/click`| primaryButton (Right Hand Only) | Boolean |
|`/input/a/touch`| primaryTouched (Right Hand Only) | Boolean |
|`/input/b/click`| secondaryButton (Right Hand Only) | Boolean |
|`/input/b/touch`| secondaryTouched (Right Hand Only) | Boolean |
|`/input/x/click`| primaryButton (Left Hand Only) | Boolean |
|`/input/x/touch`| primaryTouched (Left Hand Only) | Boolean |
|`/input/y/click`| secondaryButton (Left Hand Only) | Boolean |
|`/input/y/touch`| secondaryTouched (Left Hand Only) | Boolean |
|`/input/trigger/value`| trigger | Float |
|`/input/trigger/value`| triggerPressed | Boolean (float cast to boolean) |
|`/input/trigger/touch`| triggerTouched| Boolean (float cast to boolean) |
|`/input/thumbstick/click`| thumbstickClicked | Boolean |
|`/input/thumbstick/touch`| thumbstickTouched | Boolean |
|`/input/thumbrest/touch`| thumbrestTouched | Boolean |
|`/input/grip/pose` | devicePose | Pose |
|`/input/aim/pose` | pointer | Pose |
|`/input/stylus_fb/force` | stylusForce | Float |
|`/input/trigger/curl_fb` | triggerCurl | Float |
|`/input/trigger/slide_fb` | triggerSlide | Float |
|`/input/trigger/proximity_fb` | triggerProximity | Boolean |
|`/input/thumb_fb/proximity_fb` | thumbProximity | Boolean |
|`/output/haptic` | haptic | Vibrate |
|`/output/trigger_haptic_fb` | hapticTrigger | Vibrate |
|`/output/thumb_haptic_fb` | hapticThumb | Vibrate |
| Unity Layout Only | isTracked | Flag Data |
| Unity Layout Only | trackingState | Flag Data |
| Unity Layout Only | devicePosition | Vector3 |
| Unity Layout Only | deviceRotation | Quaternion |
2 changes: 1 addition & 1 deletion Documentation~/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Unity's OpenXR plug-in should work with any device that supports conformant Open
|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)||
|Oculus PC + Link|Windows 64-bit|DX11|HMD + Controllers|Oculus Integration package features not available|
|Oculus Quest|Android arm64|Vulkan|HMD + Controllers via [Oculus Quest Support Feature](./features/oculusquest.md)|Oculus Integration package features not available<br><br>Not yet recommended for production.|
|Meta Quest|Android arm64|Vulkan|HMD + Controllers via [Meta Quest Support Feature](./features/metaquest.md)|
|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 Down
22 changes: 22 additions & 0 deletions MetaQuest/Editor/ModifyAndroidManifestMeta.cs
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,24 @@ private void UpdateOrCreateAttribute(XmlElement xmlParentElement, string tag, st
}
}

void RemoveNameValueElementInTag(string parentPath, string tag, string name, string value)
{
var xmlNodeList = this.SelectNodes(parentPath + "/" + tag);

foreach (XmlNode node in xmlNodeList)
{
var attributeList = ((XmlElement)node).Attributes;

foreach (XmlAttribute attrib in attributeList)
{
if (attrib.Name == name && attrib.Value == value)
{
node.ParentNode?.RemoveChild(node);
}
}
}
}

internal void AddMetaData()
{
OpenXRSettings androidOpenXRSettings = OpenXRSettings.GetSettingsForBuildTargetGroup(BuildTargetGroup.Android);
Expand Down Expand Up @@ -195,6 +213,10 @@ internal void AddMetaData()
("version", "1")
});

// if the Microphone class is used in a project, the BLUETOOTH permission is automatically added to the manifest
// we remove it here since it will cause projects to fail Meta cert
// this shouldn't affect Bluetooth HID devices, which don't need the permission
RemoveNameValueElementInTag("/manifest", "uses-permission", "android:name", "android.permission.BLUETOOTH");
}
}
}
Expand Down
18 changes: 5 additions & 13 deletions MetaQuest/Runtime/MetaQuestFeature.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ protected override void GetValidationChecks(List<ValidationRule> rules, BuildTar
{
rules.Add(new ValidationRule(this)
{
message = "Only the Oculus Touch Interaction Profile is supported right now.",
message = "Only the Oculus Touch Interaction Profile and Meta Quest Pro Touch Interaction Profile are supported right now.",
checkPredicate = () =>
{
var settings = OpenXRSettings.GetSettingsForBuildTargetGroup(targetGroup);
Expand All @@ -103,26 +103,18 @@ protected override void GetValidationChecks(List<ValidationRule> rules, BuildTar
{
if (feature.enabled)
{
if (feature is OculusTouchControllerProfile)
if ((feature is OculusTouchControllerProfile) || (feature is MetaQuestTouchProControllerProfile))
touchFeatureEnabled = true;
else
otherInteractionFeatureEnabled = true;
}
}
return touchFeatureEnabled && !otherInteractionFeatureEnabled;
},
fixIt = () =>
{
var settings = OpenXRSettings.GetSettingsForBuildTargetGroup(targetGroup);
if (null == settings)
return;

foreach (var feature in settings.GetFeatures<OpenXRInteractionFeature>())
{
feature.enabled = (feature is OculusTouchControllerProfile);
}
},
error = true,
fixIt = () => { SettingsService.OpenProjectSettings("Project/XR Plug-in Management/OpenXR");},
fixItAutomatic = false,
fixItMessage = "Open Project Settings to select Oculus Touch or Meta Quest Pro Touch interaction profiles or select both."
});

rules.Add(new ValidationRule(this)
Expand Down
3 changes: 3 additions & 0 deletions MockRuntime/MockRuntime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,9 @@ protected internal override void GetValidationChecks(List<ValidationRule> result
[DllImport(extLib, EntryPoint = "MockRuntime_RegisterFunctionCallbacks")]
private static extern void MockRuntime_RegisterFunctionCallbacks(BeforeFunctionDelegate hookBefore, AfterFunctionDelegate hookAfter);

[DllImport(extLib, EntryPoint = "MockRuntime_MetaPerformanceMetrics_SeedCounterOnce_Float")]
internal static extern void MetaPerformanceMetrics_SeedCounterOnce_Float(string xrPathString, float value, uint unit);

#if UNITY_EDITOR
static void UseGenericLoaderAndroid()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,6 @@ bool ConformanceAutomation_IsActive(XrPath interactionProfilePath, XrPath userPa
active = s_ext->activeStates.find(std::pair<XrPath, XrPath>(XR_NULL_PATH, userPath));

return (active != s_ext->activeStates.end()) ? active->second : defaultValue;
}
}

#undef CHECK_EXT
Loading

0 comments on commit 6c7d016

Please sign in to comment.