Class StroopTestGenerator
Presents Stroop-test stimuli in sequence and records each participant's response time and correctness via StroopTestDataHandler.
[RequireComponent(typeof(UIDocument))]
public sealed class StroopTestGenerator : MonoBehaviour
Inheritance
Remarks
The Stroop interference task (name a colour word displayed in a conflicting ink colour) is used as a secondary-task cognitive load measure: a slower mean reaction time during a scenario indicates higher mental load imposed on the participant by that scenario's vehicle behaviour.
Input actions are bound via actionReferences rather than hard-coded
keys so that the same generator can be driven by keyboard (developer testing)
or gamepad buttons (participant rig) without code changes.
Methods
OnInput(CallbackContext)
Handles user input during the Stroop Test. This method is intended to be registered as a callback for an InputAction. It records the user's input, logs the reaction time, stores the data, and progresses to the next stimulus.
public void OnInput(InputAction.CallbackContext context)
Parameters
| Name | Type | Description |
|---|---|---|
context | InputAction.CallbackContext | The input action callback context. |