> 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-for-360-stimuli.md).

# Meta Quest Pro - Setup Guide for 360 stimuli

Build a Unity APK that plays 360 video with eye tracking on the Meta Quest Pro, record on the headset and import the recordings into iMotions Lab.

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

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)

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

   > 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-UnityPlug](https://github.com/imotions/iMotions-UnityPlugin.git#meta)in.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 samples and choosing import

You have now imported the iMotions Unity Plugin and the AVPro Movie Capture asset

## Creating a Unity APK file for 360 stimuli

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 scenes located under assets in the project window
4. Open the SampleScene and rename it to ThreeSixtyVideo
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 ThreeSixtyVideo sample, and paste them in here
8. Click down into the iMotions-System-Meta object and then click on the VideoCapture object
9. In the inspector window on the right, remove the capture controller component that shows a yellow warning
10. Click Add Component and choose the AVPro Movie Capture → Capture From Camera

How to Make a 360° Video APK for Meta Quest Pro

### 1. Put the 360 video in Unity

1. In your project, create this folder:

   Assets/StreamingAssets
2. Copy your 360 video into it. This can be done by dragging and dropping the video into the folder inside Unity

3\. Create the Render Texture (RT\_360)

1. In the Project window, right-click → Create → Render Texture.
2. Rename it RT\_360
3. Select RT\_360 in Inspector:
   * Size: match video resolution (Depends on the video e.g., 4096x2048, 4096x4096)
   * Leave the rest as default.

### 4. Create a Skybox Material

1. Right-click in Project → Create → Material → name it Skybox360.
2. In Inspector, change Shader to Skybox/Panoramic.
3. For Spherical (360°), set:
   * Mapping → Latitude-Longitude Layout (default). Image Type → 360. 3D Layout → Depends on the video type
4. Drag and drop your RT\_360 object into the Spherical (HDR) slot

### 5. Set up the Video Player

1. In Hierarchy, create an empty GameObject → call it VideoPlayer.
2. Add Video Player component.
   * Render Mode → Render Texture Target Texture → drag in RT\_360
   * Loop → enable
   * Wait For First Frame → enable Play On Awake → enable

### 6. Add the Script

1. Inside the videoPlayer inspector, click on Add Component and choose to add a new script (Bottom option)
2. Name it 360VideoPlayer
3. Click on the 3 small dots on the right side under the newly created script, and click on edit script
4. Copy and paste the code below and replace everything in the file

```
using UnityEngine;
using UnityEngine.Video;
using System.IO;

public class Play360FromStreamingAssets : MonoBehaviour
{
    [SerializeField] VideoPlayer player;
    [SerializeField] string fileName = "my360.mp4";
    void Awake()
    {
        if (!player) player = GetComponent<VideoPlayer>();
        player.source = VideoSource.Url;
        string path = Path.Combine(Application.streamingAssetsPath, fileName);
        player.url = path;
        player.waitForFirstFrame = true;
        player.playOnAwake = true;
        player.isLooping = true;
    }
    void Start()
    {
        player.Play();
    }
}
```

In the Inspector:

1. Drag your Video Player into the player field.
2. Check fileName matches the video in StreamingAssets.

### 7. Assign the Skybox

1. Go to Window → Rendering → Lighting → Environment.
2. In Skybox Material, assign your Skybox360 material.
3. At runtime, the script will feed RT\_360 into it.

### 8. 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

9\. Build the APK file *Make sure that the 360 project 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 ThreeSixtyVideo Scene
3. Click on Build and save the APK somewhere safe

## 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.

How to capture, record, and save the file

1. Once you have launched the 360 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

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-for-360-stimuli.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.
