Getting Started with XR Toolkit in Unity (Part 1) — Installing

Alwin Kuruvilla
3 min readAug 25, 2021

--

Hello, and welcome!

This is going to be a 4-part series on how to setup your project with Unity’s XR Toolkit. By the end, you’ll have a functioning VR player in your game. Let’s begin!

Before starting, your should at least create a floor in your scene for the player to walk on. If you already have a pre-built scene, load it up!

Installing the Packages

Once you have your scene loaded, we’re going to install the XR Plugin Management package. From Unity’s top menu, go to Window → Package Manager. In the Package Manager window, make sure you are viewing packages from the Unity Registry. (You’ll know what packages you are viewing from the top-left of the window where it says “Packages: Unity Registry”)

Select “XR Plugin Management” and click install at the bottom-right of the window

XR Plugin Management Installation

Next, we need to install the XR Interaction Toolkit (XR Toolkit for short). As of the writing of this post, XR Toolkit is still in Preview. Simply click on the gear icon on the top-right of the Package Manager and select “Advanced Project Settings”

You’ll be brought to the Package Manager settings in the Project Settings window.

Check the “Enable Preview Packages” checkbox and go back to the Package Manager and you should see “XR Interaction Toolkit” available to install.

Once you click install, the setup process will run. During this process, if you have not already installed the new Unity Input System, the system will prompt you to install it. Select “Yes” and continue through the setup process. When setup is complete, Unity will restart itself.

Importing Default Actions

Once the package is installed, you can import the “Default Input Actions” to make life a little easier to interact in the virtual world.

Within the XR Interaction Toolkit page in the Package Manager, just below the description is a section called “Samples.” Inside of this section, you can import the “Default Input Actions”.

Once imported, Unity should automatically bring you to the actions folder in your Project window. If not, a folder called “Samples” will be placed in your Assets folder. Drill down into it and you will find several presets as well as the input actions for XR Interactions.

Click on each Preset: XRI Default [Continuous Move/Continuous Turn/Left Controller/Right Controller/Snap Turn] and in the Inspector window, click the “Add to … default” button that is just below the name of the preset at the top.

Selected Preset and its Inspector settings
Add to default button just below name

There you are! Join me in my next article where we set everything up!

Cheers!

--

--

Alwin Kuruvilla
Alwin Kuruvilla

No responses yet