The following guide describes how Unity works with EMOTIV LSL Interface.
- Install Unity (recommend version 2018.4.22f1 or later)
-
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.
-
Open DataReceiver.unity in Demos folder (
.\Assets\LSL4Unity\Demos\
). -
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:
- Hit Disconnect to disconnect to the stream.
- 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
andCurrentTime
. - The
MarkerTime
andCurrentTime
are epoch time in double format - we need both for the time synchornization between machines. - The
MarkerTime
is time of marker event. TheMarkerValue
is value of marker.The CurrentTime
is current epoch time of processing.
- Build a standalone application or run on Editor directly. Then hit Start button to start sending markers to LSL network.
-
Go to Lab Streaming Layer page, Inlet tab on EmotivPRO, choose Unity_LSL in stream name. Then click the Connect button.
-
Markers will be added to data stream as the vertical red lines: