> For the complete documentation index, see [llms.txt](https://help.imotions.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.imotions.com/lab/study-setup-and-design/virtual-reality/meta-quest-pro/meta-quest-pro-setup-guide-unity-environment.md).

# Meta Quest Pro - Setup Guide Unity Environment

Add the iMotions Unity plugin to a Unity environment, build an APK for the Meta Quest Pro and import its eye tracking recordings into iMotions Lab.

*This article provides a step-by-step guide on creating a Unity environment for the Meta Quest Pro. The guide includes information for all the necessary steps and prerequisites for getting started with the Unity environment.*

Prerequisites

1. Make sure to install Unity Hub [Unity Hub](https://docs.unity.com/en-us/hub/install-hub)
2. The iMotions Unity plugin supports Unity 6 and Unity 2022.3, and has been tested on Unity 6000.6.9f1 and 2022.3.40f1. Install one of these versions through Unity Hub, or download it from the [Unity Archive](https://unity.com/releases/editor/archive).
3. Visit the Meta Quest page [Meta Quest - Device setup](https://developers.meta.com/horizon/documentation/native/android/mobile-device-setup/), and follow the instructions on how to create an organization and set up the device for developer mode. Make sure also to download the ADB files listed at the bottom of the page
4. Download the SideQuest Desktop app to be able to load the Unity APK files onto the headset. You can download the app from here, [SideQuest](https://sidequestvr.com/setup-howto)
5. Make sure to purchase the full version of the AVPro Capture asset if you do not wish to use the trial version, which has a floating watermark on your environment at all times. The purchase removes this watermark permanently. This is used to capture the VR recording and is required. Purchase from here [AVPro Movie Capture - Mobile](https://assetstore.unity.com/packages/tools/video/avpro-movie-capture-mobile-edition-221852) (Make sure it's the mobile version)
6. Any Unity environment you build yourself or find in the Unity asset store can be used with the integration. Please make sure the asset supports the Unity version you use.

Download and import the iMotions Unity Plugin

1. Download the iMotions Unity plugin from this link: [iMotions Unity Plugin](https://github.com/imotions/iMotions-UnityPlugin/tree/meta-no-watermark).
2. Unzip the Folder
3. Place the iMotions Unity Plugin Meta folder somewhere safe, as Unity will reference this folder location each time you launch the project. (Replacing the folder after creating the project and importing the package will result in an error.)
4. Inside Unity Hub, create a new project and make sure to launch it using Unity 6 (6000.6.9f1) or 2022.3.40f1.
5. Inside the Unity project, go to Window → Package Manager and click on the plus icon in the top left corner. Choose to import the package from disk and click into the iMotions Unity Plugin twice

   > Inside the Unity project, go to Window → Package Manager and click on the plus icon in the top left corner. If you plan on using the trial version of the AVPro capture asset, make sure you import the package using URL instead of from disk inside of Unity. Paste the following URL when asked: <https://github.com/imotions/iMotions-UnityPlugin.git#meta> (The trial version has a floating watermark)
   >
   > Make sure to install Git first: [Git](https://git-scm.com/install/)
6. Choose the package.json and import it into Unity. Make sure to import the samples from the plugin.
7. To set up the plugin correctly with the Unity project, follow this video guide:

{% embed url="<https://files.imotions.com/hc_articles/videos/iMotions%20Unity%20Plugin%20Setup.mp4>" %}

8. After doing the steps in the instruction video, click on Window → Package manager and download the AVPro Movie Capture asset. It will appear under Packages: My assets in the top left corner. Make sure to import the asset into Unity by going to the samples and choosing Import

## Creating a Unity APK file for Unity environments

1. Launch the same project from earlier
2. You should be inside the sample scenes from the iMotions plugin if you followed the video guide.
3. Go to Window → Package Manager and import the Unity asset you have purchased from the Unity Asset Store.
4. Open the relevant scene from the asset.
5. Go back to the iMotions sample scene located under samples → iMotions Meta Plugin → 1.0.11 → Meta EyeTracking Data Export Example → Scenes, and relaunch the SampleScene.
6. From here, copy the OVRcamera and the iMotions-System-Meta by holding down Ctrl and left-clicking on both of them; make sure to copy both of them.
7. Go back to the Asset scene, and paste them in here. Click down into the iMotions-System-Meta object and then click on the VideoCapture object
8. Click Add Component and choose the AVPro Movie Capture → Capture From Camera
9. Make sure to have set up the correct Unity settings and the settings for the iMotions Unity plugin (refer to the video guide in the setup steps above)

### Android build settings

Go to Edit → Project Settings → Player → Other settings

1. Under Rendering → Color Space → Linear
2. Under Rendering → Uncheck or make sure Auto Graphics APIs is off → Move OpenGLES3 so it's placed as the first option.
3. Go to Configuration → Scripting Backend → IL2CPP
4. Target Architectures → ARM64

## How to load the APK file into the Meta Quest Pro

1. Open SideQuest
2. Create an account and log in if you haven't already
3. Make sure to connect the headset using a USB-A to USB-C cable
4. Once the headset has been connected, make sure you have allowed USB debugging (Follow the steps in this guide ([Enabling debugging](https://developers.meta.com/horizon/documentation/native/android/mobile-device-setup/) scroll down to point 6)).
5. SideQuest should now present a green circle in the top left corner, meaning the headset is now connected.
6. To install the APK file, click on the white box with a download icon called install APK file from folder on computer, the option is located in the top right corner
7. Choose the APK file and click Open.
8. Once the APK file has been downloaded and installed, put on the headset and locate the 'Unknown Sources' folder.
9. Here, the APK file should be visible, and you should be able to launch it.

### Build the APK file

*Make sure that the environment can be played inside Unity*

1. Click on File in the top left corner and choose Build Settings
2. Click on Add Open Scene and make sure it's the Scene of your environment
3. Click on Build and save the APK somewhere safe

## How to capture, record, and save the file

1. Once you have launched the Unity environment on the headset, you can record by clicking on the trigger button located on the right-hand controller. It's the button that falls naturally with the middle finger.
2. To end the recording, click the same button again. This will save a folder containing a screen recording and the corresponding CSV eye tracking data file. To locate the folder, open SideQuest and connect the headset again. Make sure debugging has been enabled
3. Click on the “Manage Files on the headset” icon in the top right corner
4. Click on Android → Data → Locate the name of the Unity project and click on it → Files → iMotions
5. You can save the iMotions folder to the PC by clicking on the save icon on the right side.

### Importing recordings into iMotions

Once you have saved the recording folder to the PC, do the following:

1. Inside of iMotions, click on the blue “create new study” Icon
2. Choose “Virtual Reality (VR)”
3. Choose “Import VR Recordings”
4. Select the Meta Quest Pro
5. New study and import the recordings folder.

When you import the recording, make sure to place the study files folder containing the capture video and the CSV file inside an import folder so it looks like this:

![](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-885d937ccb3dc75d575083c4a56ea47b75100731%2F10bff25f01_image-Q28B5VNV.webp?alt=media)

You will need to choose the Import folder to import:

![The dialog for importing Meta Quest Pro data, with the data folder filled in](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-d30acc93c2e37f93a515362d14d43dfecd073298%2Flab_import_meta-quest-pro-data-folder.png?alt=media)

> It’s important to ensure that the Eye Tracking data file is formatted correctly. The decimal separator needs to be a dot, and not a comma.
>
> <img src="https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-0bfd11839c6650f0598e1a625c71cf3e31476590%2F79438fd384_image-WIKPAN2W.png?alt=media" alt="" data-size="original">


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.imotions.com/lab/study-setup-and-design/virtual-reality/meta-quest-pro/meta-quest-pro-setup-guide-unity-environment.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
