Skip to content
Ivan Aguilar edited this page Apr 3, 2022 · 28 revisions

The [UXF_Rig] prefab contains all the functionality of UXF, including the included user interface.

The UI consists of several features, including a series of inputs allowing collection of demographic data, as well as space for presenting instructions. The UXF UI can be configured, including disabling it completely.

Startup panel

The UXF startup panel can be used by researchers or participants.

The UI allows the experimenter to select the experiment profile (.json file), set save data location, collect simple demographic data about the participants, and view information whilst the task is running.

The UI itself is handled in a GameObject called [UXF_UI], a child GameObject of [UXF_Rig] and components of the UI can be customised by editing the options in the UIController component.

Before UXF 2.0 there was a Participant List system, which has been removed, as it was largely redundant.

Settings selector

The settings selector system allows researchers to configure one or more set of parameters for use in the session. This could be things like the number of trials, some instructions text, the appearance of some stimuli, or any piece of information that your code can use to run the experiment.

The UI searches for files in the StreamingAssets folder in your Unity project or project or build. The files that match a custom string pattern (*.json by default), populate the dropdown menu at the top of the UI. The researcher can then use the dropdown menu to select the file they wish to use. The files must contain valid json, this will then be deserialized into a Settings object. These settings files can be added, removed or modified without changing any code, which speeds up iteration time.

The Settings selector is not compatible with Web based builds at this time.

After pressing the Start button on the UI, the settings will be stored in the Session component, accessible in code via (e.g.) session.settings.GetInt("key"). See the settings system page for more information.

Participant details entry (Datapoints)

Often we want a series of datapoints to be collected about a participant - such as their age, gender, or even things that could affect the task such as the preferred hand of the participant.

We can easily add these to the UI in UXF. Just add more entries to the Participant Data Points field in the Experiment Startup Controller component attached to [UXF_UI]. See the GIF below for a demo.

Data entered here will be available in the session.participantDetails dictionary, using their internal name. E.g:

int age = (int)session.participantDetails["age"];
string gender = (string)session.participantDetails["gender"];

Session number selector

Allows assigning a number to the session. This is useful if the same participant performs the task several times. Session number is used in the save directory and can be accessed from the Session component as session.number.

Starting the session

When the researcher presses the start button, the UI system collects all the information and uses it to initialise the Session.

UXF 1.X (Legacy)

Participant selector

The UI uses a concept of a "participant list", which is a .csv file that stores basic information about participants. This system allows researchers to optionally pre-prepare all participant information beforehand. The UI buttons allow researchers to either select an existing participant list, or create an empty one. From there, the researcher will have the option to select a new participant, or one that already exists in the list. The participant information is then entered, and any changes made will be saved in the participant list.

The data points that the UI collects can be customised. For example, you can collect age, gender, or any other value such as the assigned group in your experiment. This is done via the ExperimentStartupController component inspector. The participant ID is always collected as it is used in the file output.

After pressing the Start button on the UI, the participant's information will be stored in the Session component as a Dictionary<string, object>, accessible in code via session.participantDetails["key"].

Notes panel

Allows researchers to add notes to a session, which will be stored in a notes.json file in the Session folder. It also features a checkbox to conveniently mark a session as "bad" such that it can be excluded from later analysis. It can be accessed by clicking the button on the Info bar or (by default) the F1 key.

Info bar

The Info Bar provides access to the notes panel as well as real-time information of the trial status, trial number, etc. This gameobject can be safely disabled if you want to remove this feature.

๐Ÿง  Core topics

โ“ More help


๐Ÿ‘ฉโ€๐Ÿ’ป Programming reference

Unit tests

Clone this wiki locally