Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Read and save VR input data to CSV file

Discussion in 'XR Interaction Toolkit and Input' started by Fauster23, Aug 17, 2023.

  1. Fauster23

    Fauster23

    Joined:
    May 19, 2021
    Posts:
    4
    Hi guys,

    I am writing to you because I would like to learn if someone knows a way to save the data (log files) in the "Devices" part of the "XR Interaction Debugger" into a CSV file.

    More specifically, I am looking for a solution to read the data related to the headset head movements (meaning the transform of the main camera or head-tracking) and save them at the end of the game session in a text file or, even better, in a CSV file.
    Moreover, I am also looking to read and save all the actions (like how many times a user presses the grip button or stuff like this) done with the VR controllers.

    Have any of you ever had to deal with this?

    I am using the Meta Quest 2, and I am also searching if this operation is possible within the Meta Developer Hub. However, at the moment, I do not achieve any solution.
    Thanks to everybody for any help!
     
  2. JuanGuzmanH

    JuanGuzmanH

    Joined:
    Feb 8, 2018
    Posts:
    70
    This feature is not implemented on the headset OS or unity, you have to do it by your own. Using c# open a file, and append head position and rotation every 0.2 seconds for example. Csv, Json or whatever format you choose is up to you. Dont forget to write and close the file on app quit event.