This tutorial guides you through implementing an experiment on LUIDA using this implementation template, by building a simple experiment step by step.
- Installation, account creation, and learning about CCK
- Create a new experiment on the LUIDA Web Console and fill in the required information
- Initial setup of this implementation template (Unity)
- Detailed experiment configuration using the Luida Editor
- Set experiment variables (within-subject variables, between-subject variables) - trial count is automatically calculated
- Design experiment progression (state transitions)
- Link questionnaires to states
- Configure object behaviors linked to states
- Define custom data to record
- Other implementations using Unity & CCK
- Test locally (in Unity Editor)
- Upload to cluster as a world and verify operation
- Final settings on LUIDA Web Console (World ID registration and avatar settings)
- Wait for publication
Before starting this tutorial, we recommend learning the following basics:
- Unity
- JavaScript
- Cluster Creator Kit (CCK)
- At minimum, review Triggers and Gimmicks
Also, please complete the following preparations before starting the tutorial:
- Create a cluster account
- Install the required version of Unity for cluster
- Log in to the LUIDA Web Console for the first time and submit an approval request. After submitting the request, please contact the administrator (y.hu@cluster.mu).
In this experiment, we will reproduce the Stroop effect (a phenomenon where recognizing the color of text takes longer when the color differs from the meaning of the word) in VR space. First, participants will perform repeated calculation tasks to induce cognitive load, then we will examine the effects of stimulus presentation depth conditions (near/far) on reaction time and accuracy.
- Experiment procedure
- Start -> Instructions -> Repeated calculation tasks -> Main task repeated twice per condition -> Presence questionnaire -> End
- Experimental conditions (in the main task)
- Between-subject condition: Depth (near/far)
- Within-subject conditions:
- Response target: First respond to font color, then respond to text meaning
- Font color: Red or Blue (random presentation)
- Text meaning: "Red" or "Blue" (random presentation)
- Each condition is administered twice
- Evaluation metrics (in the main task):
- Response results for each condition (accuracy can be calculated later)
- Response time for each condition
Experiment demonstration (from start to questionnaire): https://github.com/user-attachments/assets/852259cb-f871-4589-bdf1-cb37cefde213
- Open the LUIDA Web Console.
- Create a new experiment: Click "+New Experiment" and register the basic experiment information with the following values:
- Title:
Stroop Effect Experiment - Participation requirements:
No color vision deficiency - Reward:
0 - Image URL: Any string (e.g.,
https://example.com/image.png) - World ID: Leave blank for now
- Room capacity:
1 - Status:
Testing
- Title:
| New Experiment Button | Experiment Registration Form |
|---|---|
![]() |
![]() |
-
Navigate to experiment details page: Once the experiment is registered, click on that experiment's row from the home page to access its details page. Verify the information you just registered.
-
Create questionnaires: Scroll down and perform the following operations in the questionnaire registration form:
- Pre-experiment questionnaire
- Click "Add Questionnaire" button -> Enter any title and description without selecting a template -> Click "Add" button
- Click the "Question List" button for the added questionnaire and add question items by filling in the form and pressing "+Add Question". Example questions:
- Title:
Gender, Options:Male,Female,Other, Question Type:Radio Button - Title:
Age, Question Type:Text Input - Title:
I frequently experience VR, Description:1: Strongly disagree, 2: Disagree, 3: Somewhat disagree, 4: Neutral, 5: Somewhat agree, 6: Agree, 7: Strongly agree, Options:1,2,3,4,5,6,7, Question Type:Linear Scale
- Title:
- Post-experiment questionnaire 1. Click "Add Questionnaire" button -> Select "IPQ" from "Template Selection" -> Click "Add" button 2. Click the "Question List" button for the added questionnaire and verify the added questions.

- Pre-experiment questionnaire
-
Copy experiment ID: Copy the "Experiment ID" displayed at the top of the experiment details page. This ID will be used later in the Unity project.

*Some of these steps will be automated in the future. For now, please complete all steps.
-
Download the latest release of the implementation template.
-
Open the downloaded Unity project from Unity Hub. Errors may appear in the console when opening the project, but ignore them first and import the following required packages into Unity:
- CSCombiner: Tool for combining Cluster Scripts in Unity Editor (ver1.01 recommended)
- CSEmulator: Tool to play Cluster Scripts in Unity Editor (for now, please use V2 instead of V3)
-
Open
LUIDA > Scene > Create New Scenefrom Unity's menu bar, enter a scene name for your experiment (e.g.,MyExperimentScene), and press the OK button.
-
Next, link your cluster account to this Unity project. The procedure is as follows (see the image for reference):
- From the Unity menu bar, open the
LUIDA > Configure experiment identifierswindow. - Click the
Create Access Tokenbutton to open the cluster access token creation page in your web browser. - Click the
Create Tokenbutton, and then copy and paste the displayed token into theAccess Tokenfield in theConfigure experiment identifierswindow that you just opened in Unity.
- From the Unity menu bar, open the
-
With the identifiers configuring window still open, enter the Experiment ID you copied from the web console earlier into the
Experiment IDfield, and then close the window. -
If the Verify Token is not generated yet, click the
Generate a new verify tokenbutton. -
Close the identifiers configuring window.
In the LUIDA > Configure experiment automation > Experiment Variables screen (left figure), when you register within-subject/between-subject variables for the experiment, the system automatically determines the number of trials and experimental conditions for each trial (right figure).
For details on each setting, see the documentation.
![]() |
![]() |
-
Open the
LUIDA > Configure experiment automationwindow from Unity's menu bar and click theActivate Experiment Automation Featurebutton.
-
Confirm that the
Experiment Variablestab is open. -
Set within-subject variables: Add 3 items to
Variables for Within-Subject Conditionsand configure as follows:- Name:
requestValues:font, meaningisRandom: [ ] - Name:
fontValues:R,BisRandom: [x] - Name:
textValues:Red,BlueisRandom: [x]
- Name:
-
Set between-subject variables: Add 1 item to
Variables for Between-Subject Conditionsand configure as follows:- Name:
depthValues:near,far
- Name:
-
Enter
2inTrials Count per Condition. This means each condition (combination of variables) will have 2 trials.
After configuration, verify that the screen looks like the figure below.
In the LUIDA > Configure experiment automation > State Machine screen (left figure), when you set up the experiment flow in units called "states", the experiment progresses automatically as shown in the right figure.
Each state represents a segment of the experiment (e.g., instructions, task execution, rest, questionnaire response), and you define how they transition here.
For details on each setting, see the documentation.
- Link the first state to a questionnaire: In the
Startrow:- Press the
Add Questionnairebutton and enter1forqID.
- Press the
- Auto-skip the instruction state after 30 seconds: Check
Has Exit Timein theIntrorow and enter30forExit Time. - Add a calculation task state and repeat 5 times:
- Press the
Add State Before Trialsbutton to add a state. Rename it toCalculationTask. - Check
Is Repeatedin theCalculationTaskrow, selectCalculationTaskforRepeat Destination, and enter5forRepeat Count.- This state will now repeat 5 times before proceeding.
- Increase the number if you want more calculations.
- Press the
- Trial state: No special settings needed for the
Trial - Startrow. - Auto-skip trial rest state after 3 seconds: Check
Has Exit Timein theTrial - Restrow and enter3forExit Time. - Link the post-trial state to a questionnaire: In the
Outrorow:- Press the
Add Questionnairebutton and enter2forqID.
- Press the
After configuration, verify that the screen looks like the figure below.
In LUIDA > Configure experiment automation > State-listening Items, you can control object behaviors according to experiment progression (state transitions).
Examples of behaviors: Show/hide self or child objects, set position/rotation of self or child objects, change text content, vibrate controller, wait for seconds, custom actions (code your own), etc.
*Objects and behaviors not dependent on specific states can also be created/configured using standard Unity and Cluster Creator Kit (CCK) methods.
For details on each setting, see the documentation.
- Open
LUIDA > Configure experiment automation > State-listening Items. - Enter
InstructioninNew Item Nameand click theAdd state-listening itembutton.- A column will be added to the table below, and an object named
Instructionwill be created in the scene.
- A column will be added to the table below, and an object named
- Click the
Add Listenerbutton at the cells where theInstructioncolumn intersects with theIntro,Trial - Start, andTrial - Restrows, and configure as shown in the table below.
Instruction Set Text for Trial - Start
- On State Start 1st Set Text
- Click the if button
- Var Name:
request - Is Value:
font - Text:
Click the button that matches the text's font color.
- On State Start 2nd Set Text
- Click the if button
- Var Name:
request - Is Value:
meaning - Text:
Click the button that matches the text's meaning.
This makes the instruction object's text content differ based on the experimental condition request.
- Find the Instruction object in the scene and adjust its position as shown in the figure below.
- Find the Text child object and configure
TextViewas shown in the figure below.
| Instruction | Text child object |
|---|---|
![]() |
![]() |
-
Open
LUIDA > Configure experiment automation > State-listening Items. -
Red font text: Enter
Text_RedFontinNew Item Nameand clickAdd state-listening itembutton. -
Blue font text: Enter
Text_BlueFontinNew Item Nameand clickAdd state-listening itembutton. -
Click the
Add Listenerbutton at the cells where theText_RedFontandText_BlueFontcolumns intersect with theTrial - Startrow, and configure as shown in the figure below. - Configuration explanation - Only visible duringTrial - Startstate - If the trial's conditionfont=R, only the red font is shown; iffont=B, only the blue font is shown - If the trial's conditiontext=Red, both texts show Red; iftext=Blue, both show Blue - If the trial's conditiondepth=near, both are positioned at z=1; ifdepth=far, both at z=3
-
Find the Text_RedFont and Text_BlueFont objects in the scene and adjust their positions as shown in the figure below.
-
Add a
MovableItemcomponent to each, uncheckUse GravityinRigidBody, and checkIs Kinematic. -
Find the Text child object for each and configure
TextViewas shown in the figure below.
| Text_RedFont / Text_BlueFont | Text child object |
|---|---|
![]() |
![]() |
- Open
LUIDA > Configure experiment automation > State-listening Items. - Red answer button: Enter
Answer_RedinNew Item Nameand clickAdd state-listening itembutton. - Blue answer button: Enter
Answer_BlueinNew Item Nameand clickAdd state-listening itembutton. - Click the
Add Listenerbutton at the cells where theAnswer_RedandAnswer_Bluecolumns intersect with theTrial - Startrow, and configure as shown in the figure below.- Configuration explanation: Only visible during
Trial - Start.
- Configuration explanation: Only visible during
- Button appearance: Find the Answer_Red and Answer_Blue objects in the scene, create a Cube as a child object, and adjust position and material.
| Answer_Red Text child object | Answer_Blue Text child object |
|---|---|
![]() |
![]() |
- Click behavior and state transition setup: Find the Answer_Red and Answer_Blue objects themselves, add
Interact Item TriggerandLuida To Next State Gimmickcomponents to each, and configure as shown in the figure below.
| Answer_Red | Answer_Blue |
|---|---|
![]() |
![]() |
| isRed: Check | isRed: Uncheck |
How it works and additional notes
Note: If the
LUIDA-DataCollectorgame object doesn't exist, right-click in Hierarchy and selectLUIDA > Data Collectorto create it.![]()
-
See CCK documentation for the relationship between Triggers and Gimmicks: https://docs.cluster.mu/creatorkit/world/trigger-gimmick/
-
Expected behavior (e.g., Answer_Red):
- When clicked,
Interact Item Triggeractivates, sending a message withisRed=truetoLUIDA-DataCollector, then sending atoNextStatemessage to This (itself). - Upon receiving the
toNextStatemessage,Luida To Next State Gimmicktriggers a state transition.
- When clicked,
-
Luida To Next State Gimmickis a LUIDA-specific CCK gimmick. Others includeLuida Process Data And Save To Collection GimmickandLuida Update Collected Data Gimmick.
- Open
LUIDA > Configure experiment automation > State-listening Items. - Enter
TimeRecorderinNew Item Nameand clickAdd state-listening itembutton. - Click the
Add Listenerbutton at the cells where theTimeRecordercolumn intersects withFunctions, events, variables not listening to the state machine,Trial - Start, andOutrorows, and configure as shown in the table below.
Functions, events, variables not listening to the state machine
Initialize timer and run timer during trial:
function Start() {
$.state.timer = 0;
}
function Update(deltaTime) {
if ($.state.isInTrial) $.state.timer += deltaTime;
}Trial - Start
On State Start Customized Action: Initialize timer and set in-trial flag
$.state.isInTrial = true;
$.state.timer = 0;On State End Customized Action: Clear in-trial flag and send timer value (see CCK documentation for setStateCompat)
$.state.isInTrial = false;
SendDataToCollector("timer", $.state.timer); // Send response time to LUIDA's Data Collector (details later)Also, the Process and save collected data action triggers LUIDA's data recording function. Data format is described later.
- Open
LUIDA > Configure experiment automation > State-listening Items. - Enter
CalculationTextInputinNew Item Nameand clickAdd state-listening itembutton. - Copy and paste the following script into the
Functions, events, variables not listening to the state machinecode block for theCalculationTextInputcolumn:
function getRandomInt(max) {
// Define function to generate random integer
return Math.floor(Math.random() * max);
}
$.onTextInput((text, meta, status) => {
if (status === TextInputStatus.Success) {
ToNextState(); // Transition to next state when text input is received from participant
// Note: We're just having them calculate, so we don't check if the answer is correct. Edit the script yourself if you want to verify.
}
});- Click the
Add Listenerbutton at the cell where theCalculationTextInputcolumn intersects with theCalculationTaskrow, add a Customized Action, and copy and paste the following script into the code block:
// PARTICIPANTS[1] identifies the first participant (there's only one anyway)
PARTICIPANTS[1].requestTextInput(
"ask_to_calculate",
getRandomInt(100) + "+" + getRandomInt(100) + "=?"
);| Functions, events, variables not listening to the state machine | Trial - Start |
|---|---|
![]() |
![]() |
LUIDA allows you to define and calculate custom data to record (e.g., isRed value sent when clicking answer buttons, timer value sent after each trial, and experimental conditions for each trial).
For details on each setting, see the documentation.
Follow the instructions below to configure.
-
Find the
LUIDA-DataCollectorgame object in the scene and double-clickScript Assetin its Inspector (see figure below). The script editing screen will open.
-
Replace the contents with the following script and save the file:
return {
stateLog: COLLECTED_DATA["stateLog"], // The state at the time this data is recorded
cond: CONDITION || {}, // Conditions for the corresponding trial (includes depth, request, font, text)
ans: $.getStateCompat('this', 'isRed', 'boolean') ? "R" : "B", // answer (red or blue)
time: COLLECTED_DATA['timer'] // time taken to answer
};- The isRed value sent to LUIDA-DataCollector via CCK component is retrieved with
$.getStateCompat('this', 'isRed', 'boolean') - Timer value sent via
SendDataToCollector("timer", $.state.timer);is retrieved withCOLLECTED_DATA['timer'] - Current trial's experimental condition is retrieved with
CONDITION[variable_name]
Follow the steps below to configure
Follow the steps below to configure
- Follow the official cluster documentation Steps to upload a world to upload the created scene as a cluster world.
- After uploading, enter the world yourself and experience the entire experiment as a participant to verify operation.
- At this point, normal avatar selection is available, but once you configure avatar settings in the LUIDA web console (described later) and the experiment is officially published, participants will join with the specified avatar (or hidden avatar).
- If bugs are found after uploading, we recommend using the "test upload" feature after fixing in the Unity project to verify in cluster's Test Space. This allows testing without affecting the published world.
- Once fixes are complete and verified in the test space, perform the normal world upload again.
- Along with verifying operation in the cluster world, check the LUIDA web console to confirm that experiment data (questionnaire responses, other configured log data, etc.) is correctly recorded and displayed.

Follow the steps below to configure
- Log in to the cluster official website in your web browser and verify that the uploaded experiment world appears in the list on the "My Content" page (or "World" management screen).
- Select the relevant world and open the world details page. The alphanumeric string at the end of the page URL is the World ID (e.g., the
XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXXpart ofhttps://cluster.mu/w/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX). Copy this World ID.
- Open the experiment information edit screen on the LUIDA web console and register/save the copied World ID in the designated field (e.g., "World ID").

Follow the steps below to configure
For the experiment in this tutorial, you don't need to configure participant avatars, but if you want to hide avatars or use specific avatars for the experiment, follow these steps:
-
In the LUIDA web console, click the "Add World-Avatar Set" button in the
Avatar Settingssection on the experiment settings page. -
Enter the experiment world ID you registered earlier in the
World IDfield. -
Configure one of the following and click "Submit" to save:
- To hide avatars: Only check
Hide Avatar. Other fields can be left empty. - To specify a particular avatar: Only check
Assign Avatarand enter/upload the following information:Avatar Name: Avatar name (for management)VRM Version: VRM model version to use (e.g.,0.xor1.0)Upload VRM: Avatar VRM fileUpload Thumbnail (PNG): Avatar thumbnail image (PNG format recommended)
- To hide avatars: Only check
Once all the above settings are complete, your experiment is ready to be listed on the LUIDA participant recruitment world. Please allow a few days for publication.
*Note: In the future, we plan to improve LUIDA's experiment information update process so that newly registered experiments can be published more quickly (e.g., within one day).



























