immersivecognition / unity-experiment-framework

UXF - Framework for creating human behaviour experiments in Unity

Home Page:https://immersivecognition.github.io/unity-experiment-framework/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

ari-g-rit opened this issue · comments

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 :
<UXF_Session>.settings.basePath
<UXF_Session>.settings.experimentPath
<UXF_Session>.settings.participantPath

Am I missing something?

Thanks for your hard work, Jack.

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