Unity’s new XR Interaction Toolkit allows developers to implement interactivity into their AR and VR experiences without needing to code. The toolkit is available for Unity 2019.3 and can be downloaded from the Package Manager. It features a number of components which can be attached to different GameObjects in order to give them certain interactive properties. These are systems which typically need to be scripted or downloaded from external libraries. Now built into Unity, these systems are going to make developing an XR app faster and more stable.
Let’s now have a look at what’s available for both VR and AR.
- Interactivity with objects: hover over, select, grab, throw and rotate.
- Ability to interact with UI elements using your VR hands.
- VR locomotion: teleportation, snap turning.
- VR rigs for stationary and room-scale experiences.
- Haptic feedback through the controllers.
- Cross-platform XR controller input.
In order to use the AR interactions, AR Foundation is required. This is a Unity framework you can download from the Package Manager.
- AR gestures for interacting with objects in the world: tap, drag, zoom and pinch.
- Object placement.
- UI interactions.
- AR annotations to inform users about objects placed in the world.
XR (extended reality) is a blanket term for both virtual reality (VR) and augmented reality (AR). The toolkit covers both systems because although they function differently, many of the systems are the same. Tracking the rotation and position of a camera in 3D space (headset for VR, phone for AR) and interacting with objects (grabbing, selecting, etc).
Unity is also really good at platform independent development. You’ll notice that there’s no Oculus Interaction Toolkit, or Windows MR Interaction Toolkit. This is because on the surface, you’re developing for an XR interface and not any specific device. The same goes for AR. You don’t need to worry if the device you’re developing for is the iPhone X or 11. You’re developing for AR or VR inside of Unity and the engine does all of the translation between the different platforms behind the scenes.
As of late, Unity is putting more time into developing their XR systems. With the announcement of the new XR Plugin Framework earlier this year and now the XR Interaction Toolkit – developing VR for Unity is becoming easier and more accessible.
If you’re interested in trying out the new XR Interaction Toolkit, check out the tutorials below to give you a full overview on how these new systems work and how to add them to your project.
- Unity XR Interaction Toolkit Tutorials series by Dilmer Valecillos
- Unity XR Toolkit series by VR with Andrew
- Introduction to VR in Unity – Unity XR Toolkit Tutorials by Valem
- How to Code a VR Game by Daniel Buckley
- How to Code an AR Application by Daniel Buckley