GithubHelp home page GithubHelp logo

alexandregastonbellegarde / unity-experiment-trial-manager Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jinwook31/unity-experiment-trial-manager

0.0 0.0 0.0 332 KB

Unity Trial Manager for 2D/3D/VR/AR Behavioral Experiment

C# 100.00%

unity-experiment-trial-manager's Introduction

Unity-Experiment-Trial-Manager

A Unity library for 2D/3D/VR/AR Behavioral Experiment. Recent HCI and cognitive, behavioral research use Unity to implement their experiment. There are already various frameworks (https://github.com/immersivecognition/unity-experiment-framework) on Github that provide a simple and faster implementation environment. However, those frameworks do not provide functions that restart from a specific point. Escpecially for VR experiment, there are various components that could occur error such as tracking, power and connection etc. Thus, if there is an error during the experiment, it needs to be done from the beginning.

To resolve this issue, we developed a library that provides a restart function from a specific trial number (where experiment is stopped by accident or error) and separated the trial randomization process by reading the pre-generated CSV file. Also, we tried to embed the reading and save the trial data, so users could focus on the stimuli design and ease the burden on those who are not familiar with Unity programming, and save time.

Citation

Kim, J., Kim, Y.J., & Lee, J. (2022). ExpTrialMng: A Universal Experiment Trial Manager for AR/VR/MR Experiments based on Unity. arXiv preprint arXiv:2209.02966.

https://arxiv.org/abs/2209.02966

Requirement

  • Unity
  • Pre-generated Trial CSV (in correct format)
  • Experiment Trial Manager.unitypackage

Usage

import the package into your Unity project and include Experiment Manager.prefab to your scene.

ex_screenshot

You need to type in 4 components in Trial Data (i.e., CSV File Name, Input Idx, Output Idx, Start From)

  • CSV File Name : Type the name of the pre-generated trial CSV.

  • Input Idx : Type the index of input size in pre-generated trial CSV. (ex. 6 for the csv format image)

  • Output Idx : Type the index of output size in pre-generated trial CSV. (ex. 3 for the csv format image)

  • Start From : Type the trial number that you want to start from.

After experiemnt, you can find the result CSV file in the Asset folder.

Experiment Manager

After setting parameters, all you need to do with this template is to link your stimuli code (visual, audio, haptic etc.) with the trial info in the ExperimentManager.

Please see the example in the 'ExperimentManager.cs'. You do not need to modify other scripts in the template! (Except when you want to modify the result CSV path.)

  • Save the trial results
string[] trialResult = {"2022-05-12 12:30:22","3","5642"};
bool readDone = TrialData.td.trialDone(false, trialResult);
  • Read the stimuli for next trial
string stim0 = TrialData.td.getTrialInfo(2);
string stim1 = TrialData.td.getTrialInfo(3);

Pre-generated Trial CSV Format

  • Location : ./Assets/(your file name).csv

The CSV must include 'partiNumber', 'trialNumber' in 0 and 1 header index in order to initiate the experiment. Also, the slots for output needs to be empty as the 'currentTime', 'responseIntensity' and 'responseTime' figure below.

ex_screenshot

Trial Manager Work Flow

ex_screenshot

unity-experiment-trial-manager's People

Contributors

jinwook31 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.