com.unity.xr.interaction.toolkit 2.0.0
com.unity.xr.interaction.toolkit
Notes: processedReleased February 21, 2022
Unity Compatibility
Minimum Unity: 2019.4
Package Dependencies
- com.unity.inputsystem (1.2.0)
- com.unity.modules.audio (1.0.0)
- com.unity.modules.imgui (1.0.0)
- com.unity.modules.physics (1.0.0)
- com.unity.ugui (1.0.0)
- com.unity.xr.core-utils (2.0.0)
- com.unity.xr.legacyinputhelpers (2.1.8)
✨ Features
- Added a warning message to the Inspector of `XRGrabInteractable` with non-uniformly scaled parent. A child `XRGrabInteractable` with non-uniformly scaled parent that is rotated relative to that parent may appear skewed when you grab it and then release it. See Limitations with Non-Uniform Scaling. (1228990)
- Added support for gamepad and joystick input when using the XRUIInputModule for more complete UGUI integration.
📈 Improvements
- Changed sockets so selections are only maintained when exclusive. `XRSocketInteractor.CanSelect` changed so that sockets only maintain their selection when it is the sole interactor selecting the interactable. Previously, this was causing interactables that support multiple selection to not get released from the socket when grabbed by another interactor, which is not typically desired.
- Changed sockets so the hover mesh is positioned at the original attach transform pose for selected interactables. This fixes the case where the hover mesh would be at the wrong location when the attach transform is dynamically modified when an XR Grab Interactable is grabbed.
- Changed `XRDirectInteractor` and `XRSocketInteractor` by adding an `OnTriggerStay` method to fix an issue where those interactors did not detect when a Collider had exited in some cases where `OnTriggerExit` is not invoked, such as the Collider of the interactable being disabled. Users who had already implemented `OnTriggerStay` in derived classes will need to call the base method.
- Changed `GestureTransformationUtility.Raycast` default parameter value of `trackableTypes` from `TrackableType.All` to `TrackableType.AllTypes` to fix use of deprecated enum in AR Foundation 4.2. The new value includes `TrackableType.Depth`.
- Renamed the Default Input Actions sample to Starter Assets.
- Updated the manual to move most sections to separate pages.
- Moved some components from the **Component > Scripts** menu into **Component > XR**, **Component > Event**, and **Component > Input**.
- Changed `com.unity.xr.core-utils` dependency to 2.0.0.
🔧 Bug Fixes
- Fixed `XRDirectInteractor` and `XRSocketInteractor` still hovering an `XRGrabInteractable` after it was deactivated or destroyed.
- Fixed properties in event args for select and hover being incorrect when the same event is invoked again during the event due to the instance being reused for both. An object pool is now used by the `XRInteractionManager` to avoid the second event from overwriting the instance for the first event.
- GC.Alloc calls have been reduced: ray interactors with UI interaction disabled no longer allocate each frame, XRUIInputModule now avoids an allocating call, and AR gesture recognizers no longer re-allocate gestures when an old one is available.
- Fixed Editor classes improperly using `enumValueIndex` instead of `intValue` in some `SerializedProperty` cases. In practice, this bug did not affect users since the values matched in those cases.
- Fixed issue where `EventManager.current.IsPointerOverGameObject` would always return false when using `XRUIInputModule` for UI interaction. (1387567)
- Fixed XR Tint Interactable Visual from clearing the tint in some cases when it was set to tint on both hover and selection. Also fixed the case when the interactable supports multiple selections so it only clears the tint when all selections end. It will now also set tint during `Awake` if needed.
- Fixed `ARTests` failing with Enhanced touches due to version upgrade of Input System.
- Fixed use of deprecated methods and enum values in `GestureTransformationUtility` when using AR Foundation 4.1 and 4.2.
