Skip to content

This repository contains various examples to use with the XR Interaction Toolkit

License

Notifications You must be signed in to change notification settings

Unity-Technologies/XR-Interaction-Toolkit-Examples

Repository files navigation

XR Interaction Toolkit Examples - Version 3.0.7

Introduction

This project provides examples that use Unity's XR Interaction Toolkit (XRI) to demonstrate its functionality with example assets and behaviors. The intention of this project is to provide a means for getting started with the features in the XR Interaction Toolkit package.

Note: If you are looking for the original XRI Examples project, that has been archived into two separate branches Classic 1.0 and Classic 2.2. Both of these branches still have both the AR and VR projects available.

Getting started

Requirements

The current version of the XRI Examples is compatible with the following versions of the Unity Editor:

  • 2021.3 and later

Downloading the project

  1. Clone or download this repository to a workspace on your drive
    1. Click the ⤓ Code button on this page to get the URL to clone with Git or click Download ZIP to get a copy of this repository that you can extract
  2. Open a project in Unity
    1. Download, install, and run Unity Hub
    2. In the Installs tab, select Locate or Add to find or install Unity 2021.3 LTS or later. Include the Windows Build Support (IL2CPP) module if building for PC, and the Android Build Support if building for Android (for example, Meta Quest).
    3. In the Projects tab, click Add
    4. Browse to folder where you downloaded a copy of this repository and click Select Folder
    5. Verify the project has been added as XR-Interaction-Toolkit-Examples, and click on it to open the project

General setup

The main example scene is located at Assets/XRI_Examples/Scenes/XRI_Examples_Main. This example scene is laid out as a ring with different stations along it. The first examples you will encounter are the simplest use-cases of XRI features. Behind each example is a doorway leading to advanced uses of each feature.

Use the simple examples when you need objects you can copy-and-paste, while leveraging the advanced examples when needing to achieve complex outcomes.

The XR Origin is located within the Complete Set Up prefab. This prefab contains everything needed for a fully functional user interaction with XRI. This includes the components needed for general input, interaction, and UI interaction.

Scripts, assets, and prefabs related to each feature or use case are located in the associated folder in Assets/XRI_Examples.

The following stations are available in the XRI Examples:

For a list of new features and deprecations, see XRI Examples Changelog.

For an overview of how the Input System is used in this example, see Input.

Sharing feedback

The XR Interaction Toolkit and Input forum is the best place to open discussions and ask questions. Please use the public roadmap to submit feature requests. If you encounter a bug, please use the Unity Bug Reporter in the Unity Editor, accessible via Help > Report a Bug. Include “XR Interaction Toolkit” in the title to help our team triage things appropriately!

Contributions and pull requests

We are not accepting pull requests at this time.

About

This repository contains various examples to use with the XR Interaction Toolkit

Resources

License

Stars

Watchers

Forks

Packages

No packages published