com.unity.xr.interaction.toolkit 3.1.0
com.unity.xr.interaction.toolkit
Source docsNotes: processedReleased February 24, 2025
Unity Compatibility
Minimum Unity: 2021.3
Package Dependencies
- com.unity.inputsystem (1.8.1)
- com.unity.mathematics (1.2.6)
- com.unity.modules.audio (1.0.0)
- com.unity.modules.imgui (1.0.0)
- com.unity.modules.physics (1.0.0)
- com.unity.modules.xr (1.0.0)
- com.unity.ugui (1.0.0)
- com.unity.xr.core-utils (2.4.0)
✨ Features
- Added code samples for interaction events and interaction manager registration events in interaction events documentation.
- Added warning help box to `CurveInteractionCaster` and `XRRayInteractor` when using cone casting with multiple segments to inform users about potential computation cost.
- Added a Drag Start Position Input property to the Screen Space Ray Pose Driver component to improve the ability to select a dragged object in AR projects. The ray will be initially cast from the touch start position instead of the current drag position when the drag gesture starts in order to improve the ability to pick small objects.
- Added a Tap Duration property to the Touchscreen Gesture Input Loader component to configure the threshold that a touch and release must occur within for a tap gesture. The `GestureRecognizer` classes used in the `TouchscreenGestureInputController` were made `public` to allow the configuration properties to be modified.
- Added Editor analytics to gather data that helps Unity understand how the package is being used in projects. If you don't want to send data to Unity, please see Editor analytics documentation for how to disable analytics in your project.
📈 Improvements
- Changed the tap cancel duration from 0.3 seconds to 0.5 seconds on the `TouchscreenGestureInputController` input device created by the Touchscreen Gesture Input Loader component. This affects the `Screen Space Ray Interactor` prefab in the AR Starter Assets sample. This should make selecting objects more forgiving with a slower tap. (XRIT-208)
- Changed the Max Tap Duration on the Tap interactions from the default Input System (0.2 seconds) to 0.5 seconds on the mouse bindings in both the Tap Start Position and Spawn Object input actions. This should make selecting and spawning objects more forgiving with a slower tap when using the mouse when simulating in the Unity Editor. (XRIT-208)
- Changed Spawn Trigger Type from Select Attempt to Input Action on the AR Interactor Spawn Trigger component in the `Screen Space Ray Interactor` prefab in the AR Starter Assets sample. Changed the binding in the Spawn Object input action to use the tap gesture in the `TouchscreenGestureInputController` input device instead of the generic `/Press` binding with the Tap interaction so that spawning uses consistent tap cancel logic as selection taps.
- Changed Min Scale from 0.05 to 0.2 on the AR Transformer component on each of the spawning objects in the `ARDemoScene`.
- Changed `RigidBody.Interpolate` to `None` for interactables in the `HandsDemoScene` to fix interactable position issues when the table is moved.
- Changed `XRUIInputModule` to now initialize to the Input System when active input handling in Project Settings is set to Input System Package (New) or Both.
- Changed `XRUIInputModule` to use `enableMouseInput`, `enableTouchInput`, `enableGamepadInput`, and `enableJoystickInput` when using Input System Package (New) as the backend when none of the Input System UI Actions are set, not just when using Input Manager (Old).
- Changed `XRRayInteractor.TryGetHitInfo` to return the hit info of the selected interactable or highest scored interactable instead of the nearest raycast hit. (XRIT-141)
- Changed `XRDeviceSimulator` and `XRInteractionSimulator` by adding the `OnDestroy` method. Users who had already implemented either method in derived classes will need to call the base method.
- ### Deprecated
- Deprecated `XRUIInputModule.activeInputMode` and hide in the Inspector window since the backing serialized field is ignored and instead set in `OnEnable` to Input System Actions when possible.
🔧 Bug Fixes
- Fixed an issue with the `XRPokeInteractor` that would attempt to register a valid target for each collider that was poked for a single interactable. ([XRI
