Repository navigation
3.0.0-pre.1
[3.0.0-pre.1] - 2023-12-14
Warning
Some serialized fields used by deprecated code were removed with this version. To avoid potential data loss, especially if you were getting warnings about using deprecated functionality, update your project to the latest 2.x version of this package (for example, 2.5.2) before updating your project to version 3.0.
Added
- Added a new type of teleport interactable, Teleportation Multi-Anchor Volume, that enables teleportation to one of several destination poses chosen by a filter object that implements
ITeleportationVolumeAnchorFilter.- Added
FurthestTeleportationAnchorFilter, which is the default filter that chooses the furthest anchor as the destination. Use the menu item Assets > Create > XR > Locomotion > Furthest Teleportation Anchor Filter to create an instance of this filter. - Added
GazeTeleportationAnchorFilter, which chooses a destination based on where the user is looking and how far away the anchor is. Use the menu item Assets > Create > XR > Locomotion > Gaze Teleportation Anchor Filter to create an instance of this filter. - Added menu item Assets > Create > XR > Locomotion > Teleport Volume Destination Settings, which creates a Teleport Volume Destination Settings Datum asset.
- Added
Multi Floor Ladderprefab to the Starter Assets sample, and added an instance of this prefab to theClimb Sampleprefab. This prefab includes another ladder Climb Interactable and a Teleportation Multi-Anchor Volume that uses a Gaze Teleportation Anchor Filter to teleport to one of three destinations.
- Added
- Added the interface
IXRInteractableCustomReticle, which allows a component on an interactable's Custom Reticle prefab to respond to the interactable instantiating the reticle and attaching it to an instance ofIXRCustomReticleProvider.- Added an example implementation of this interface in the new
Climb Teleport Reticleprefab in the Starter Assets sample.
- Added an example implementation of this interface in the new
- Added a rotation threshold to
XRScreenSpaceControllerso that scaling is not triggered while rotating. - Added in-editor touchscreen gesture support for rotation and scaling in the starter assets. The input action map now has bindings for the related gestures.
- Added Climb Teleport Interactor, which enables assistance with climb locomotion by teleporting the user to a specific destination when they end a climb interaction.
- Added the property Climb Assistance Teleport Volume to Climb Interactable to enable this teleportation behavior for a specific climb interactable.
- Made the following changes to the Starter Assets sample to demonstrate climb teleportation:
- Added a Climb Teleport Interactor instance in the
XR Origin (XR Rig)prefab under Locomotion System > Climb. - Assigned the Climb Assistance Teleport Volume references in the
Single Floor LadderandMulti Floor Ladderprefabs. - Added the affordance component Climb Teleport Destination Indicator, and added an instance of this component to the
XR Origin (XR Rig)prefab. - Added the
Climb Teleport Arrowprefab and supporting assets.
- Added a Climb Teleport Interactor instance in the
- Added public members
climbAnchorInteractable,climbAnchorInteractor, andclimbAnchorUpdatedtoClimbProvider. - Added public method
Angle(in Vector3, in Vector3, out float), which finds the angle between two vectors, toBurstMathUtility. - Added functionality to
SortingHelpers- Added
IInteractorDistanceEvaluatorto be able to define the method used to determine the distances between interactables and an interactor which serves to rank the interactables during a sort. - Added in place interactable sorting methods.
- Added delegate to be able to define the method used to determine the distances between interactables and an interactor which serves to rank the interactables during a sort.
- Added in place interactable sorting methods.
- Added
- Added
IAttachPointVelocityProvider,IAttachPointVelocityTracker, andAttachPointVelocityTrackerto make the attach point velocity tracking functionality accessible outside of theXRBaseInteractor. - Added a new type of component, XR Body Transformer, which manages queued
IXRBodyTransformations to apply to the XR Origin. This component supplies anIXRBodyPositionEvaluatorto transformations so that they can use the user's body as a frame of reference. By default the body position is estimated to be directly underneath the camera. Transformations can also use an optionalIConstrainedXRBodyManipulatorto apply movement constrained by collision.- Added a new type of scriptable object, Character Controller XR Body Manipulator, which implements
IConstrainedXRBodyManipulatorby using a Character Controller that matches the user's body position and height. - Added the following implementations of
IXRBodyTransformation:DelegateXRBodyTransformation,XROriginMovement,XRBodyGroundPosition,XROriginUpAlignment,XRBodyYawRotation,XRCameraForwardXZAlignment, andXRBodyScale.
- Added a new type of scriptable object, Character Controller XR Body Manipulator, which implements
- Added
handednessproperty to interactors to allow you to specify if the interactor is for the left or right hand. Interactables are able to make use of it for custom functionality when they need to know which hand (if any) the interactor is associated with. Also added extension methods to interactables related to this property:IXRSelectInteractable.IsSelectedByLeft,IXRSelectInteractable.IsSelectedByRight,IXRHoverInteractable.IsHoveredByLeft, andIXRHoverInteractable.IsHoveredByRight.
Changed
- Changed
IXRInteractorto add a newhandednessproperty to allow you to specify if the interactor is for the left or right hand. The property was added toXRBaseInteractorand the prefabs in the Starter Assets sample were updated to initialize it. Users with existing prefabs may want to set the value so that they can make use of it in interactable scripts. Users with custom interactor scripts that do not derive from the base class will need to add it to their class implementation. - Changed setup of the ladder and elevated teleport area in the
Climb Sampleprefab in the Starter Assets sample so that the objects are set up in a newSingle Floor Ladderprefab. This prefab also contains a Teleportation Multi-Anchor Volume to allow teleportation to the top or bottom, whichever is furthest from the user. - Changed
XRPokeInteractorto useIAttachPointVelocityTrackerinstead of the velocity tracking that used to live inXRBaseInteractor. - Changed
XRTransformStabilizer- Core logic to compute stabilization is now done in a public static method so that external classes can use it like a utilities library.
- Fixed local transformation logic.
- Optimized included bubbles sort function from
SortingHelpers. - Changed how Two-Handed Grab Move Provider applies rotation and scaling of the XR Origin. Rotation and scaling now happen around the user's body position (the camera position projected onto the XZ plane of the XR Origin) instead of the XR Origin's position.
- Changed core locomotion system to place less responsibility on provider implementations to manage state changes and allow greater configurability of the order in which providers apply transformations to the XR Origin. Each provider's locomotion state is now centrally maintained by the Locomotion Mediator based on requests for the XR Body Transformer linked to the mediator.
- Replaced the now deprecated
LocomotionSystemwithLocomotionMediator. - Replaced the now deprecated
LocomotionPhasewithLocomotionState. - Deprecated several members of
LocomotionProviderand added new members in their place for communicating with the Locomotion Mediator and providing information for state changes. Deprecated members include:beginLocomotion,endLocomotion,CanBeginLocomotion,BeginLocomotion, andEndLocomotion. - Changed timing of when Locomotion Providers apply transformations to the XR Origin. Now in each Provider's
Update, rather than applying the transformation immediately the Provider queues its transformation into the XR Body Transformer. Transformations are applied in queue order in the XR Body Transformer'sUpdate, which occurs later in the same frame. - Changed timing of when
ContinuousMoveProvider,ConstrainedMoveProvider, andContinuousTurnProviderinvoke locomotion events, for consistency with other providers. Now these providers invokelocomotionStartedwhen the start of move input occurs (e.g. thumbstick is moved from rest state) andlocomotionEndedwhen the end of move input occurs (e.g. thumbstick is released).
- Replaced the now deprecated
- Changed the move speed in the
XR Origin (XR Rig)prefab in the Starter Assets sample from1to2.5. - Changed default value of
UIInputModule.trackedDeviceDragThresholdMultiplierfrom1.4to2and updated the preset in the Starter Assets sample to match. - Changed
XRControllerRecorder.GetControllerStateso it only returns a valid value when playing or recording. Also changed so theoutparam is returnednullinstead of allocating when the method returnsfalse. - Renamed
ActionBasedControllerManagertoControllerInputActionManagerin Starter Assets sample. - Changed
ControllerInputActionManagerto no longer add or modify interactors in the XR Interaction Group. The prefab in Starter Assets is already configured to what it would try to change it to. - Changed the default execution order of
ControllerInputActionManagerback to the default and added anUpdatemethod instead of creating a coroutine. - Renamed Anchor Control in XR Ray Interactor to Attach Transform Manipulation to make it more apparent that it is for manipulating the Attach Transform. Also renamed related properties to make it match the display name in the Inspector window.
- Renamed
allowAnchorControlproperty tomanipulateAttachTransform. - Renamed
anchorRotateReferenceFrameproperty torotateReferenceFrame. - Renamed
anchorRotationModeproperty torotateMode. - Renamed
AnchorRotationModeenum toRotateMode. - Renamed
RotateAnchormethod toRotateAttachTransform. - Renamed
TranslateAnchormethod toTranslateAttachTransform. - Renamed corresponding properties in the
XRRayInteractorEditor.
- Renamed
- Renamed
ScaleMode.InputtoScaleMode.ScaleOverTime. - Renamed
ScaleMode.DistancetoScaleMode.DistanceDelta. - Renamed Enable Interaction with UI GameObjects on XR Ray Interactor to UI Interaction.
- Changed the created hierarchy of GameObjects for the XR Origin from the GameObject > XR menu to no longer include interactors and tweaked some settings for the Mobile AR variant.
- Changed
XRDirectInteractorEditorso the Selection Configuration properties are drawn in a foldout. The properties are now drawn in a newDrawSelectionConfigurationNestedmethod which the previously definedDrawSelectionConfigurationcalls into after drawing the foldout.
Deprecated
- Deprecated code and serialized fields from XRI 1.x.x are now treated as errors.
- Deprecation of
AttachPointCompatibilityModeenum andXRGrabInteractable.attachPointCompatibilityModealong withXRLegacyGrabTransformerare now treated as errors. - Deprecated old way of handling AR Interaction. Download the AR Stater Assets for a full demo scene using the new architecture.
- The Affordance System namespace and all associated classes have been deprecated. The existing affordance system will be moved, replaced, and updated with a new interaction feedback system in a future version of XRI.
- Deprecated Character Controller Driver. Instead enable the Use Character Controller property under the Constrained Movement Settings on the XR Body Transformer.
- Deprecated exclusive access and timeout behavior of the Locomotion System.
- Deprecated controller classes (
XRBaseController,ActionBasedController,XRController, andXRScreenSpaceController) and their corresponding Editor classes. Inputs needed for each interactor are now directly serialized with the interactor. The Transform position and rotation can instead be driven by the Tracked Pose Driver (Input System) component. The model can be instantiated with a custom script or directly added to the XR Origin prefab. These components will no longer appear in the Component > XR > Locomotion menu or in the Add Component menu in the Inspector window. - Deprecated
InputHelpers. The values from the XRInputDeviceclass can be read using the new input readers contained in theLegacy XR Input Readerssample instead. - Deprecated Action-based and Device-based locomotion components. These components will no longer appear in the Component > XR > Locomotion menu or in the Add Component menu in the Inspector window.
ActionBasedContinuousMoveProviderandDeviceBasedContinuousMoveProvidershould be replaced withContinuousMoveProvider.ActionBasedContinuousTurnProviderandDeviceBasedContinuousTurnProvidershould be replaced withContinuousTurnProvider.ActionBasedSnapTurnProviderandDeviceBasedSnapTurnProvidershould be replaced withSnapTurnProvider.GrabMoveProvider.grabMoveActionshould be replaced withGrabMoveProvider.grabMoveInput.
- Deprecated
XRBaseControllerInteractorand replaced withXRBaseInputInteractor. - Deprecated
XRBaseControllerInteractorEditorand replaced withXRBaseInputInteractorEditor.- Deprecated
XRBaseControllerInteractorEditor.BaseControllerContentsand replaced withXRBaseInputInteractorEditor.BaseInputContents.
- Deprecated
- Deprecated
XRBaseInputInteractor.hideControllerOnSelectsince it depended on the deprecated XR Controller (Action-based) or XR Controller (Device-based) component. You can use the Select Entered and Select Exited events to deactivate/activate the controller model GameObject instead.
Removed
- Removed menu items for Action-based and Device-based components from the GameObject > XR menu.
- Removed menu item for Locomotion System from the GameObject > XR menu.
- Removed the backing serialized field (
m_System) forLocomotionProvider.systemto avoid it appearing in the Inspector window sinceLocomotionSystemis now deprecated. Users that referenced a specific Locomotion System instance when there were multiple in the scene will now need to move it to the GameObject or parent GameObject of the Locomotion Provider or manually set the property during runtime if they wish to continue using it. If there is only a single Locomotion System component, the provider will automatically find it during Awake. - Removed presets for deprecated components from the Starter Assets sample.
- Removed Meta Gaze Adapter sample.
- Removed XR Legacy Input Helpers (com.unity.xr.legacyinputhelpers) package from dependencies. If you are making use of the pose provider override on the deprecated XR Controller component, you will need to ensure this package is added to your project.
Fixed
- Fixed issue where rotating on vertical planes with the
ARTransformerwould snap to an unintended rotation. - Fixed failing unit tests caused by introduction of global actions in Input System 1.8.0.
- Fixed a math error in the
XRDistanceEvaluatorwhereCalculateNormalizedScorewould return an incorrect score.