|

Unity XR Interaction Toolkit: Free Beginner Setup Guide for VR Developers

The Unity XR Interaction Toolkit (XRI) is a free official Unity package that gives you VR grab, teleport, ray interact, and UI interaction ready to use without writing interaction code from scratch. Install it via Package Manager, search for “XR Interaction Toolkit”, add an XR Origin to your scene, and your first VR interaction is ready to test in under 30 minutes. It supports Meta Quest, PSVR2, Valve Index, and any OpenXR headset.

The XR Interaction Toolkit is the fastest path to working VR interactions in Unity without paying for any tools. For developers in Pakistan building VR apps, games, or training simulations, XRI is the right starting point in 2026. This guide walks you from zero to a working VR grab interaction with concrete steps.

What Is the Unity XR Interaction Toolkit?

The XR Interaction Toolkit is an official package developed and maintained by Unity Technologies. It provides a complete, production-ready system for building VR interactions using a component-based approach. Instead of building grab mechanics, ray interaction, locomotion, and UI interaction from scratch, you add XRI components to GameObjects and they handle the behaviour.

Key systems included in XRI:

  • XR Grab Interactable: Makes any GameObject grabbable with one component
  • XR Ray Interactor: Pointer ray from controller tip for distant selection and UI interaction
  • XR Direct Interactor: Touch-based interaction for objects within reach
  • Teleportation Area and Anchor: Built-in locomotion with arc teleport indicator
  • XR UI Canvas: Interact with standard Unity UI canvases in VR using the ray

XRI uses the OpenXR standard underneath, which means your project works across Meta Quest, PSVR2, Valve Index, HTC Vive, Pico, and any future OpenXR-compatible headset without platform-specific code changes.

â„šī¸ Which Unity Version to Use
Use Unity 2022.3 LTS for maximum stability with XRI 2.5+. For new projects, Unity 6 with XRI 3.0+ is the forward-looking choice. Avoid Unity 2021.x as XRI support there is minimal. The package works with the free Personal or Student editions of Unity.

Step 1: Installation via Package Manager

Open your Unity project and follow these steps exactly:

  1. Go to Window in the menu bar, then click Package Manager
  2. In Package Manager, click the + button in the top-left corner
  3. Select Add package by name
  4. Enter the exact package name: com.unity.xr.interaction.toolkit and press Add
  5. Wait for the installation to complete. You will see the package appear in the list
  6. With the package selected, click Samples in the right panel
  7. Click Import next to Starter Assets and XR Device Simulator

Next, configure OpenXR. Go to Edit, then Project Settings, then XR Plug-in Management. Under the PC tab, check OpenXR. Under the Android tab (for Meta Quest), also check OpenXR. Then click on OpenXR in the left sidebar and add an interaction profile. For Meta Quest, add the Meta Quest Touch Pro Controller Profile.

💡 Meta Quest Setup Extra Step
For Meta Quest development, install the free Meta XR All-in-One SDK from the Unity Asset Store in addition to XRI. It adds Quest-specific features like hand tracking, passthrough, and performance optimizations that XRI alone does not provide.

Step 2: Setting Up Your XR Origin

The XR Origin is the player object in your VR scene. It represents your physical head and hands in the virtual world. Setting it up takes less than two minutes:

  1. Right-click anywhere in the Scene Hierarchy panel
  2. Navigate to XR in the menu, then select XR Origin (VR)
  3. Unity creates an XR Origin with Camera Offset, Main Camera, and Left Controller plus Right Controller child objects
  4. If your scene has an old Main Camera, delete it to avoid conflicts
  5. Press Play and put on your headset. The view should track your head movement immediately

The Left Controller and Right Controller objects come pre-configured with both Ray Interactors (for pointing at distant objects) and Direct Interactors (for touching objects nearby). You do not need to configure these manually for basic use.

đŸ‡ĩ🇰 Testing Without a Headset
If you do not yet have a VR headset, use the XR Device Simulator from the Starter Assets sample. It lets you simulate VR controller input using keyboard and mouse inside the Unity Editor. Press the left mouse button to simulate grip, use WASD for movement, and right-click for controller rotation. Essential for Pakistani developers starting out before purchasing hardware.

Step 3: Your First VR Grab Interaction

Making an object grabbable in VR takes three steps and about one minute:

  1. Select any GameObject in your scene. A cube works perfectly for a first test
  2. In the Inspector, click Add Component and add XR Grab Interactable
  3. Add a second component: Rigidbody. Leave Use Gravity checked
  4. Press Play, reach out with your controller trigger button, grab the cube, and throw it

The XR Grab Interactable component handles everything: detecting when your controller intersects the object, attaching it to your hand on grip press, tracking its position while held, and releasing it with the correct velocity for a natural throw. Physics from the Rigidbody component makes it fall and bounce correctly after release.

For a socket-style snap interaction (where an object snaps to a fixed position, like placing an item on a shelf), add an XR Socket Interactor component to the target object instead of a grab interactable.

Key XRI Components Every VR Developer Should Know

Component What It Does Add To
XR Origin Represents the player in VR space with head and hands Scene root (once per scene)
XR Grab Interactable Most Used Makes any object grabbable and throwable by controllers Any object you want to grab
XR Ray Interactor Laser pointer ray for selecting distant objects and clicking UI Controller child objects on XR Origin
XR Direct Interactor Touch-based interaction for objects within arm reach Controller child objects on XR Origin
Teleportation Area Defines a floor area the player can teleport to Floor or any walkable surface
XR Socket Interactor A fixed slot that objects snap into when released nearby Target slot position GameObjects

XRI vs Other Unity VR SDKs in 2026

SDK Cost Platform Support Best For
Unity XRI Recommended Free All OpenXR headsets Cross-platform VR, all skill levels
Meta XR SDK Free Meta Quest only Quest-specific hand tracking, passthrough
SteamVR Plugin Free PC VR via Steam PC-only VR games on Valve Index, Vive
Pico SDK Free Pico headsets only Publishing to Pico store in China or EU
VRTK 4 Free (Patreon for extras) All OpenXR headsets Advanced interactions, experienced developers

Free Resources to Go Further with XRI

  • Unity Learn VR pathway: Free structured courses covering XRI from basics to shipping a project
  • Unity XRI Samples on GitHub: Official sample scenes with working grab, socket, teleport, and UI interaction
  • Valem Tutorials on YouTube: Best free XRI video tutorials updated for 2026, beginner to advanced
  • Meta Developer Hub: Free tools for sideloading builds to your Quest for testing during development
  • Unity Asset Store: Search “XR Interaction Toolkit samples” for free community scene packs
PakVR may earn a commission from qualifying purchases made through links in this article. This does not affect our recommendations or increase your price. We only recommend products we genuinely believe are useful.

Frequently Asked Questions

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *