ℹ️ Constructing your first Xblock, a building block of EDIA

🧱 Xblock?

An experiment is defined as a sequence of blocks playing after each other, in EDIA called Xblocks

Let’s write our first EDIA task block script.

Setting up the editor

  1. To create a new boilerplate task script:

    Assets/Create/EDIA/XBlockTemplateScript

    This adds a new script called NewXBlockTemplate.cs in your Assets folder. It’s good etiquette to move it into your Scripts folder.

  2. Rename it to TaskStartersKit (→ Naming conventions )

  3. Move the script to the proper folder: Assets/Samples/EDIACore/x.x.x/StartersKit/Getting Started/

  4. Doubleclick on the script, it opens in your code editor.

  5. ⚠️ A scripts name and its containing MonoBehaviour class name have to be the same. → Rename the class (from XBlockTemplate ) to TaskStartersKit

  6. Take a look at the script, it represents a very rudemantary flow of an experiment task.

Define the goal of our StartersKit task.

As an example task, we want to show a cube to the participant in a certain color. The participant then has to select the color the cube was shown in from a few options shown.

It is good practice to get the task clear before setting up the script, in this case the steps of this task would be:

  1. Prepare & show the stimulus (cube)
    1. Pick a color
    2. Assign it to the cube’s material
    3. Show the cube for a certain time
  2. User input
    1. Hide the cube
    2. Show selections of colors and a way to select them
    3. Wait on input from participant