Skip to content

Latest commit

 

History

History
44 lines (29 loc) · 2.08 KB

readme.md

File metadata and controls

44 lines (29 loc) · 2.08 KB

Guideline for Unity to work with EMOTIV LSL Interface

The following guide describes how Unity works with EMOTIV LSL Interface.

Prerequisites

  • Install Unity (recommend version 2018.4.22f1 or later)

How to receive data from EMOTIV LSL Outlet stream in Unity

  1. Go to Lab Streaming Layer page, Outlet tab in EmotivPRO, choose the desire Data stream type and Data format. Click the Start button to start streaming.

  2. Open DataReceiver.unity in Demos folder (.\Assets\LSL4Unity\Demos\).

  3. Build a standalone application or run on Editor directly. Choose a stream name then hit Connect button to connect to the selected LSL stream. The header and data will be displayed like this:

  1. Hit Disconnect to disconnect to the stream.

How to send marker from Unity to EMOTIV LSL Inlet

  1. Open MarkerSender.unity in Demos folder (.\Assets\LSL4Unity\Demos\). The demo will create markers event every one second.
  • Each marker event contains 3 channels MarkerTime, MarkerValue and CurrentTime.
  • The MarkerTime and CurrentTime are epoch time in double format - we need both for the time synchornization between machines.
  • The MarkerTime is time of marker event. The MarkerValue is value of marker. The CurrentTime is current epoch time of processing.
  1. Build a standalone application or run on Editor directly. Then hit Start button to start sending markers to LSL network.

  1. Go to Lab Streaming Layer page, Inlet tab on EmotivPRO, choose Unity_LSL in stream name. Then click the Connect button.

  2. Markers will be added to data stream as the vertical red lines:

Reference