immersivecognition / unity-experiment-framework

UXF - Framework for creating human behaviour experiments in Unity
https://immersivecognition.github.io/unity-experiment-framework/
MIT License
215 stars 41 forks source link

Session does not store path information (basepath, experimentpath, participantpath) #92

Closed ari-g-rit closed 2 years ago

ari-g-rit commented 2 years ago

Using UXF version 2.3.1.

I am trying to have pupil labs record data to a folder nested within the UXF data folder. To do this, I'm using a UXF event on session begin to set the Pupil Labs folder and initialize recording. However, I'm getting errors because none of the paths within UXF are set correctly.

I'm looking at :

.settings.basePath .settings.experimentPath .settings.participantPath Am I missing something? Thanks for your hard work, Jack.
jackbrookes commented 2 years ago

If those are in the documentation, they need to be removed. Since UXF 2.0 supports different data output modes, to access the path, you need to reference the appropriate data handler.

In this case, you can reference the FileSaver component (it should be a child of the DataHandlers GameObject).

public FileSaver fileSaver;

Then, you can run the method:

string sessionPath = fileSaver.GetSessionPath(session);

https://github.com/immersivecognition/unity-experiment-framework/blob/master/Assets/UXF/Scripts/DataHandling/FileSaver.cs#L251

You can also get the top-level path (parent of all experiments, sessions)

string storagePath = fileSaver.StoragePath;

Hope that helps Jack