Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,9 @@ MRTK3 requires Unity 2021.3.21 or higher. In addition, you need the [Mixed Reali

In previous versions of MRTK (HoloToolkit and MRTK v2), all packages were released as a complete set, marked with the same version number (ex: 2.8.0). Starting with MRTK3 GA, each package will be individually versioned, following the [Semantic Versioning 2.0.0 specification](https://semver.org/spec/v2.0.0.html). (As a result, the '3' in MRTK3 is not a version number!)


Individual versioning will enable faster servicing while providing improved developer understanding of the magnitude of changes and reducing the number of packages needing to be updated to acquire the desired fix(es).

For example, if a non-breaking new feature is added to the UX core package, which contains the logic for user interface behavior the minor version number will increase (from 3.0.x to 3.1.0). Since the change is non-breaking, the UX components package, which depends upon UX core, is not required to be updated.
For example, if a non-breaking new feature is added to the UX core package, which contains the logic for user interface behavior the minor version number will increase (from 3.0.x to 3.1.0). Since the change is non-breaking, the UX components package, which depends upon UX core, is not required to be updated.

As a result of this change, there is not a unified MRTK3 product version.

Expand Down Expand Up @@ -89,19 +88,19 @@ MRTK3 has been upgraded to use [Unity's XR Interaction Toolkit 3+](https://docs.
* The new controllers and rig retake the original names of the obsolete controllers.
* New controllers structure have been modified so that all of them have the same structure.
* The deprecated XRI2 XRController component has been removed from the controllers and its input actions have been moved to their interactors.
* The new controllers now have a Tracked Pose Driver components that holds references to the device's position, rotation, and tracking state input actions.
* The new controllers now have a Tracked Pose Driver components that holds references to the device's position, rotation, and tracking state input actions.
* Interactors now have a Tracked Pose Driver field that holds a reference to the Tracked Pose Driver component of the parent controller.
* Interactors now have a Mode Managed Root that holds a reference to the parent controller GameObject.
* Added new unity-tests for the new XRI3 functionality + components.
* Updated several unity-tests.
* Updated several scripts so that they work with both obsolete XRI2 and new XRI3 prefabs.
* Updated all scenes to use the new XRI3 rig + controllers.
* Made a copy of the old HandInteractionExamples scene and renamed as ObsoleteHandInteractionExample, this scene still consumes the old rig + controllers.
* Made a copy of the old HandInteractionExamples scene and renamed as ObsoleteHandInteractionExample, this scene still consumes the old rig + controllers.

A more detailed explanation of the changes can be found in [XRI2TOXRI3MIGRATIONGUIDE.md](./XRI2TOXRI3MIGRATIONGUIDE.md). The guide can also help others as a path for migrating their own solutions or MRTK3 forks from XRI2 to XRI3.

## Governance

For information on how the Mixed Reality Toolkit for Unity Project is governed, please read [GOVERNANCE.md](./GOVERNANCE.md).

All projects under the Mixed Reality Toolkit organization are governed by the Steering Committee. The Steering Committee is responsible for all technical oversight, project approval and oversight, policy oversight, and trademark management for the Organization. To learn more about the Steering Committee, visit this link: https://github.com/MixedRealityToolkit/MixedRealityToolkit-MVG/blob/main/org-docs/CHARTER.md
All projects under the Mixed Reality Toolkit organization are governed by the Steering Committee. The Steering Committee is responsible for all technical oversight, project approval and oversight, policy oversight, and trademark management for the Organization. To learn more about the Steering Committee, visit this link: <https://github.com/MixedRealityToolkit/MixedRealityToolkit-MVG/blob/main/org-docs/CHARTER.md>
41 changes: 24 additions & 17 deletions XRI2TOXRI3MIGRATIONGUIDE.md

Large diffs are not rendered by default.

20 changes: 15 additions & 5 deletions org.mixedrealitytoolkit.core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,22 @@

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).

## Unreleased

### Changed

* Updated `StatefulInteractable` to work across all `IXRInteractionStrengthInteractor` implementations, instead of just MRTK-specific `IVariableSelectInteractor` implementations. [PR #1085](https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity/pull/1085)

### Deprecated

* Deprecated `IVariableSelectInteractor`, as its info is duplicative with `IXRInteractionStrengthInteractor`. [PR #1085](https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity/pull/1085)

## [4.0.0-pre.2] - 2025-12-05

### Added

* Added input action focus handling to disable controller/hand tracked state when the application goes out of focus. [PR #1039](https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity/pull/1039)
* Added ToInteractorHandedness extension for XRNode. [PR #1042](https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity/pull/1042)
* Added `ToInteractorHandedness` extension for `XRNode`. [PR #1042](https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity/pull/1042)

### Changed

Expand All @@ -16,18 +26,18 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).

### Removed

* Removed ITrackedInteractor, as it was supporting an unused codepath and there are better ways to get this data (like querying the attach transform). [PR #1044](https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity/pull/1044)
* Removed `ITrackedInteractor`, as it was supporting an unused codepath and there are better ways to get this data (like querying the attach transform). [PR #1044](https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity/pull/1044)

### Deprecated

* Deprecated IHandedInteractor, as its info is now queryable directly from IXRInteractor's handedness property. [PR #1042](https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity/pull/1042)
* Deprecated FindObjectUtility, as it was a backwards-compatibility layer for pre-2021.3.18. Since our min version is now 2022.3, we can just call the API directly. [PR #1058](https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity/pull/1058)
* Deprecated `IHandedInteractor`, as its info is now queryable directly from `IXRInteractor`'s `handedness` property. [PR #1042](https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity/pull/1042)
* Deprecated `FindObjectUtility`, as it was a backwards-compatibility layer for pre-2021.3.18. Since our min version is now 2022.3, we can just call the API directly. [PR #1058](https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity/pull/1058)

## [4.0.0-pre.1] - 2024-07-09

### Added

* Added ITrackedInteractor to represent interactor with parent pose backed by a tracked input device.
* Added `ITrackedInteractor` to represent interactor with parent pose backed by a tracked input device.

### Changed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,29 +263,41 @@ protected override void OnDestroy()
/// <remarks>
/// Derived classes should override this method to specify custom selection math.
/// The default implementation allows for variable selection from
/// <see cref="IVariableSelectInteractor"/> objects, calculated using
/// <see cref="IVariableSelectInteractor.SelectProgress"/>.
/// <see cref="IXRInteractionStrengthInteractor"/> objects, calculated using
/// <see cref="IXRInteractionStrengthInteractable.GetInteractionStrength(IXRInteractable)"/>.
/// </remarks>
public virtual float GetSelectionProgress()
{
using (StatefulInteractableGetSelectionProgressMarker.Auto())
{
float selectionProgress = 0.0f;

foreach (var interactor in interactorsHovering)
foreach (IXRHoverInteractor interactor in interactorsHovering)
{
if (interactor is IVariableSelectInteractor variableSelectInteractor)
if (interactor is IXRInteractionStrengthInteractor interactionStrengthInteractor)
{
selectionProgress = Mathf.Max(selectionProgress, GetInteractionStrength(interactor));
}
#pragma warning disable CS0618 // Type or member is obsolete
else if (interactor is IVariableSelectInteractor variableSelectInteractor)
{
selectionProgress = Mathf.Max(selectionProgress, variableSelectInteractor.SelectProgress);
}
#pragma warning restore CS0618 // Type or member is obsolete
}

foreach (var interactor in interactorsSelecting)
foreach (IXRSelectInteractor interactor in interactorsSelecting)
{
if (interactor is IVariableSelectInteractor variableSelectInteractor)
if (interactor is IXRInteractionStrengthInteractor interactionStrengthInteractor)
{
selectionProgress = Mathf.Max(selectionProgress, GetInteractionStrength(interactor));
}
#pragma warning disable CS0618 // Type or member is obsolete
else if (interactor is IVariableSelectInteractor variableSelectInteractor)
{
selectionProgress = Mathf.Max(selectionProgress, variableSelectInteractor.SelectProgress);
}
#pragma warning restore CS0618 // Type or member is obsolete
else
{
selectionProgress = 1.0f;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ namespace MixedReality.Toolkit
/// <summary>
/// An interface that all gaze-pinch-like interactors must implement.
/// </summary>
public interface IGazePinchInteractor : IVariableSelectInteractor
{

}
}
public interface IGazePinchInteractor :
#pragma warning disable CS0618 // Type or member is obsolete
IVariableSelectInteractor
#pragma warning restore CS0618 // Type or member is obsolete
{ }
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ namespace MixedReality.Toolkit
/// <summary>
/// An interface that all interactors with the concept of handedness implement.
/// </summary>
[Obsolete("Use handedness from IXRInteractor instead.")]
[Obsolete(nameof(IHandedInteractor) + " has been deprecated in version 4.0.0. Use " + nameof(IXRInteractor) + " instead.")]
public interface IHandedInteractor : IXRInteractor
{
/// <summary>
/// Returns the Handedness of this interactor.
/// </summary>
[Obsolete("Use handedness from IXRInteractor instead.")]
[Obsolete("This property has been deprecated in version 4.0.0. Use " + nameof(handedness) + " instead.")]
public Handedness Handedness { get; }
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright (c) Mixed Reality Toolkit Contributors
// Licensed under the BSD 3-Clause

using System;
using UnityEngine.XR.Interaction.Toolkit.Interactors;

namespace MixedReality.Toolkit
Expand All @@ -9,6 +10,7 @@ namespace MixedReality.Toolkit
/// An interface that all interactors which offer
/// variable selection must implement.
/// </summary>
[Obsolete(nameof(IVariableSelectInteractor) + " has been deprecated in version 4.0.0. Use " + nameof(IXRInteractionStrengthInteractor) + " instead.")]
public interface IVariableSelectInteractor : IXRSelectInteractor, IXRHoverInteractor
{
/// <summary>
Expand All @@ -19,6 +21,7 @@ public interface IVariableSelectInteractor : IXRSelectInteractor, IXRHoverIntera
/// For gaze-pinch interactors, this is the pinch progress.
/// For motion controllers, this is the analog trigger press amount.
/// </remarks>
[Obsolete("This property has been deprecated in version 4.0.0. Use " + nameof(IXRInteractionStrengthInteractor.GetInteractionStrength) + " or " + nameof(IXRInteractionStrengthInteractor.largestInteractionStrength) + " instead.")]
float SelectProgress { get; }
}
}
12 changes: 11 additions & 1 deletion org.mixedrealitytoolkit.input/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).

## Unreleased

### Changed

* Updated `MRTKLineVisual` and `RingReticle` to work across all `IXRInteractionStrengthInteractor` implementations, instead of just MRTK-specific `IVariableSelectInteractor` implementations. [PR #1085](https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity/pull/1085)

### Deprecated

* Deprecated `IVariableSelectInteractor` across the interactor implementations, as its info is duplicative with `IXRInteractionStrengthInteractor`. [PR #1085](https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity/pull/1085)

## [4.0.0-pre.2] - 2025-12-05

### Changed
Expand All @@ -11,7 +21,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).

### Deprecated

* Deprecated IHandedInteractor across the interactor implementations, as its info is now queryable directly from IXRInteractor's handedness property. [PR #1042](https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity/pull/1042)
* Deprecated `IHandedInteractor` across the interactor implementations, as its info is now queryable directly from `IXRInteractor`'s `handedness` property. [PR #1042](https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity/pull/1042)

### Removed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,44 +196,30 @@ private bool IsTracked
#region IHandedInteractor

/// <inheritdoc />
[Obsolete("Use handedness from IXRInteractor instead.")]
Handedness IHandedInteractor.Handedness
{
get
{
if (forceDeprecatedInput)
{
return handController.HandNode.ToHandedness();
}

return handedness.ToHandedness();
}
}
[Obsolete("This property has been deprecated in version 4.0.0. Use " + nameof(IXRInteractor.handedness) + " instead.")]
Handedness IHandedInteractor.Handedness => forceDeprecatedInput ? handController.HandNode.ToHandedness() : handedness.ToHandedness();

#endregion IHandedInteractor

#region IVariableSelectInteractor

/// <inheritdoc />
public float SelectProgress
[Obsolete("This property has been deprecated in version 4.0.0. Use " + nameof(IXRInteractionStrengthInteractor.GetInteractionStrength) + " or " + nameof(IXRInteractionStrengthInteractor.largestInteractionStrength) + " instead.")]
float IVariableSelectInteractor.SelectProgress
{
get
{
#pragma warning disable CS0618 // Type or member is obsolete
if (forceDeprecatedInput)
{
return handController.selectInteractionState.value;
}
#pragma warning restore CS0618 // Type or member is obsolete
else if (selectInput != null)
{
return selectInput.ReadValue();
}
else
{
Debug.LogWarning($"Unable to determine SelectProgress of {name} because there is no Select Input Configuration set for this interactor.");
}
return 0.0f;

Debug.LogWarning($"Unable to determine SelectProgress of {name} because there is no Select Input Configuration set for this interactor.");
return 0;
}
}

Expand Down Expand Up @@ -286,7 +272,7 @@ public override void GetValidTargets(List<IXRInteractable> targets)
// If we are hovering something and also have gone past the sticky hover threshold,
// we should *only* consider the current hover target, regardless of what the
// gaze is currently actually looking at. (Sticky hover, ADO#1941)
if (hasHover && SelectProgress > stickyHoverThreshold)
if (hasHover && largestInteractionStrength.Value > stickyHoverThreshold)
{
targets.Add(interactablesHovered[0]);
}
Expand Down Expand Up @@ -404,7 +390,7 @@ public override bool CanHover(IXRHoverInteractable interactable)
// If so, should we be allowed to initiate a new hover on it?
// This prevents us from "rolling off" one target and immediately
// semi-pressing another.
bool canHoverNew = !isNew || SelectProgress < relaxationThreshold;
bool canHoverNew = !isNew || largestInteractionStrength.Value < relaxationThreshold;

return base.CanHover(interactable) && stickySelect && ready && canHoverNew;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public GameObject ModeManagedRoot
#region IHandedInteractor

/// <inheritdoc />
[Obsolete("Use handedness from IXRInteractor instead.")]
[Obsolete("This property has been deprecated in version 4.0.0. Use " + nameof(IXRInteractor.handedness) + " instead.")]
Handedness IHandedInteractor.Handedness
{
get
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -391,20 +391,19 @@ private void UpdateLineVisual()

// Now handle coloring the line visual
// If our interactor is a variable select interactor, change the material property based on select progress
IVariableSelectInteractor variableSelectInteractor = rayInteractor as IVariableSelectInteractor;
if (variableSelectInteractor != null)
if (rayInteractor != null)
{
lineRenderer.GetPropertyBlock(propertyBlock);
propertyBlock.SetFloat("_Shift_", variableSelectInteractor.SelectProgress);
propertyBlock.SetFloat("_Shift_", rayInteractor.largestInteractionStrength.Value);
lineRenderer.SetPropertyBlock(propertyBlock);
}

// If we are hovering over a valid object or are currently selecting one, lerp the color based on selectedness
if (rayHasHit || rayInteractor.hasSelection)
{
if (variableSelectInteractor != null)
if (rayInteractor != null)
{
cachedGradient = ColorUtilities.GradientLerp(ValidColorGradient, SelectActiveColorGradient, variableSelectInteractor.SelectProgress);
cachedGradient = ColorUtilities.GradientLerp(ValidColorGradient, SelectActiveColorGradient, rayInteractor.largestInteractionStrength.Value);
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,16 @@ public void UpdateVisual(ReticleVisualUpdateArgs args)
{
if (displaySelectionProgress)
{
if (args.Interactor is IVariableSelectInteractor variableSelectInteractor)
if (args.Interactor is IXRInteractionStrengthInteractor interactionStrengthInteractor)
{
UpdateReticleProgressVisual(interactionStrengthInteractor.largestInteractionStrength.Value);
}
#pragma warning disable CS0618 // Type or member is obsolete
else if (args.Interactor is IVariableSelectInteractor variableSelectInteractor)
{
UpdateReticleProgressVisual(variableSelectInteractor.SelectProgress);
}
#pragma warning restore CS0618 // Type or member is obsolete
else if (args.Interactor is IXRSelectInteractor selectInteractor)
{
UpdateReticleProgressVisual(selectInteractor.isSelectActive ? 1 : 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ xrController is ArticulatedHandController handController &&
#region IHandedInteractor

/// <inheritdoc />
[Obsolete("Use handedness from IXRInteractor instead.")]
[Obsolete("This property has been deprecated in version 4.0.0. Use " + nameof(IXRInteractor.handedness) + " instead.")]
Handedness IHandedInteractor.Handedness
{
get
Expand Down
Loading