-
Notifications
You must be signed in to change notification settings - Fork 55
Collect Custom Data
In general this is not necessary, most of the time the data you need to output should be stored in the trial.result object, or captured with a tracker component. However, in some cases you may need to save data associated with a session or a trial. For example, data from a survey, or any other form of data collection.
You can use the the Save* methods for your Session or Trial. These methods automatically handle the data, and store it in an appropriate location. In the case of trial-level data, using trial.Save* methods, a reference to the output data location will also be saved in the trial_results data output.
For example, storing the text abcdefg to a file called my_text for the current trial:
session.CurrentTrial.SaveText("abcdefg", "my_text");And for the current session:
session.SaveText("abcdefg", "my_text");The methods you can use on Session or Trial are:
trial/session.SaveText(string, "my_text")-
trial/session.SaveDataTable(UXFDataTable, "my_data_table")(To do this you will need to construct your own UXFDataTable object - see here. -
trial/session.HandleJSONSerializableObject(List<object>, "my_json_like_object")(Saves a list of dictionaries, string, float, int, or bool) -
trial/session.HandleJSONSerializableObject(Dictionary<string, object>, "my_json_like_object")(Saves a list of dictionaries with string keys, and string, float, int, or bool values) -
trial/session.SaveDataTable(byte[], "my_bytes.wav")(Saves some raw bytes, I use this for recording microphone data as a WAV file).
๐ง Core topics
- ๐ Background
- โจ UXF 2.0
- โ๏ธ Compatibility
- ๐ถ๏ธ Oculus Quest Setup
- ๐ญ Concepts
- ๐ ๏ธ Get started
- ๐ Examples
- ๐ฅ๏ธ Built-in UI
- ๐ Session generation
- โฐ Events
- ๐ Data collection
- โ๏ธ Collect custom data
- ๐ Custom Data Handler
- ๐ Remote Data Collection
- ๐๏ธ WebGL DynamoDB setup
- ๐ Processing DynamoDB CSVs
- ๐ซ HTTP Post Setup
- ๐ง Settings system
- ๐๐ฝ Tracker system
- ๐ Logging system
โ ๏ธ Common issues- ๐ผ๏ธ Multi-scene experiments
- ๐บ Videos
- ๐จโ๐ Full written tutorial
- ๐ฆ Asset links
- ๐จโ๐ซ Unity tutorial links
- ๐ Useful code snippets
- ๐ก Programming ideas
- ๐งฎ Example R processing