Class SessionInfo
Holds the participant and study configuration for the current runtime session, populated from the server or URL query string at startup.
[Serializable]
public class SessionInfo
Inheritance
Remarks
The simulator runs as a WebGL build embedded in a web page. Before the scene starts, the
JavaScript host passes study parameters (participant ID, scene graph name, level index, …)
via the URL or a backend API. SessionInfo is the in-memory representation of those
parameters, serialisable so it can be stored or transmitted along with collected data.
Access the current session via SessionInstance rather than constructing
SessionInfo directly. SessionInstance is the authoritative singleton that
SessionInfoFetcher populates at startup.
Constructors
SessionInfo()
Creates a SessionInfo with all fields at their default empty/zero values.
public SessionInfo()
Remarks
Used by Unity's JSON deserialiser when reconstructing the object from a server response. The deserialiser requires a parameterless constructor.
SessionInfo(SessionInfo)
Creates a deep copy of data.
public SessionInfo(SessionInfo data)
Parameters
| Name | Type | Description |
|---|---|---|
data | SessionInfo | The source instance to copy. |
Remarks
Used when a session needs to be snapshotted or passed across asynchronous boundaries without aliasing the original instance.
SessionInfo(string, string, string, int, string, string, int)
Creates a fully specified SessionInfo with all fields set.
public SessionInfo(string URL, string mTurkID, string SceneGraphName, int SubID, string studyID, string sessionID, int levelIndex)
Parameters
| Name | Type | Description |
|---|---|---|
URL | string | The WebGL canvas URL. |
mTurkID | string | The participant's Prolific or MTurk worker ID. |
SceneGraphName | string | The name of the scene graph asset for this session. |
SubID | int | The numeric subject identifier. |
studyID | string | Obsolete study identifier; pass an empty string for new sessions. |
sessionID | string | Obsolete session identifier; pass an empty string for new sessions. |
levelIndex | int | Zero-based index of the starting level. |
Fields
ParticipantID
The participant's Prolific or MTurk worker ID, used to link simulation data back to survey responses in the study's external dataset.
public string ParticipantID
Field Value
string
levelIndex
Zero-based index of the current level within the scene graph's ordered level list.
public int levelIndex
Field Value
int
Remarks
Used by the scene-transition system to determine which scene to load next and to label each data segment with the level the participant was experiencing.
sceneGraph
The name of the SceneNetworkGraph asset that defines the scene sequence for this
session.
public string sceneGraph
Field Value
string
Remarks
Different study conditions may use different scene graphs (e.g., different task orderings or experimental conditions). This field records which graph was active so session data can be grouped by condition during analysis.
sessionID
Session identifier — superseded by subject ID combined with the scene graph name.
[Obsolete]
public string sessionID
Field Value
string
studyID
Study identifier — superseded by the scene graph name and no longer written.
[Obsolete]
public string studyID
Field Value
string