Skip to content
Dr Jack Brookes edited this page Apr 2, 2022 ยท 7 revisions

Intro

(See issue discussion on this topic).

UXF can run on many platforms, but data output methods may differ. As of version 2.3.4, UXF supports 2 means of storing data when playing experiments natively on the Oculus Quest (or any Android device for that matter).

  • FileSaver - Data can be saved to the local file storage on the device, then accessed when plugged into a PC via USB.
  • HTTP POST Data Hander - Sends data to a web server (device must be connected to a network where it can access the server).

See the Data Handlers section.

If you just want to run experiments on the Oculus Quest via Oculus Link, you are running on the Windows/PCVR platform and so you do not need to set up anything special, so you can ignore the below.

Setting up VR

First, you should follow a recent tutorial for getting your device working with Unity. Test that you can run basic Unity Scenes in your headset before adding UXF to your scene. You can open the UXF Wizard popup menu to help switch to typical target platforms.

When you are ready, add the [UXF_Rig] Prefab to your scene. For compatibility, you will need to change a few things:

  • You cannot use the UI system when running on Oculus Quest natively, since there is no screen for the experimenter to see. In the UXF Session component, click the Behaviour tab, and click Configure the User Interface. Select Startup Mode -> Automatic. You could select Manual if you wish to start your session manually with code (session.Begin(...);).
  • In Automatic startup mode, you cannot select a settings file from the UI, so select Settings Mode -> Empty.
  • Finally, Automatic startup mode means you cannot select the Data Save location either. So in your Session component, select Data Handling. Here, make sure only compatible data handlers are selected. If you are using the File Saver Data Handler, select Configure. Here you need to change the Data Save Location to Persistent Data Path. This will store the data on the device's internal storage.

UI PersistentDataPath

To make full use of UXF you may want attach PositionRotationTrackers to the hands/head GameObjects to record their positions during trials.

After creating your experiment, you can build your application to an APK and run it on the device, according to Oculus & Unity instructions.

Getting your data from the Oculus Quest

If you follow the above steps, you should be able to run UXF applications on the device. When you run a UXF application, it seems currently to only save data if you do not quit mid-way through the experiment.

Data will be accessible in the form of standard files generated by UXF. If you plug your device in to a PC via USB, the files will be located at:

This PC\Quest 2\Internal shared storage\Android\data\com.MyCompanyName.MyProjectName\files\my_experiment

MyCompanyName and MyProjectName can be configure in the Unity Editor in Edit -> Project Settings -> Player.

Quitting mid-session on Oculus Quest platform

On issue with the Quest does not exit applications gracefully, so we do not have the opportunity to save the session data if the user quits. So make sure you have some means of saving your data when you complete the last trial. See issue #119 for other solutions.

WebXR

If you target the WebXR platform you could host your VR experiment on a website, the use the AWS DynamoDB data handler to collect data.

๐Ÿง  Core topics

โ“ More help


๐Ÿ‘ฉโ€๐Ÿ’ป Programming reference

Unit tests

Clone this wiki locally