High Level Classes - kirtonBCIlab/bci-essentials-unity GitHub Wiki
Controller + Behaviours
Pre-built high level functionality runs through a BCIController
using a BCIControllerBehavior
. Most users simply need to add and configure the controller behaviour specific to the desired paradigm. This is the core of BCI functionality, implementing stimulus routines and conversation with BCI-Essentials Python.
This core is "driven" using the BCIController
class using methods like StartStopStimulus
, StartAutomatedTraining
, and UpdateClassifier
. A controller behaviour must first be registered in order to be activated, both of which can be done in a single step automatically using the self-registration parameters provided.
Controller Instances
The static implementation of BCIController
provides the simplest way to drive your registered behaviour(s), as it requires no references and will generate the required components as required upon registration.
However, certain use cases may require greater configuration. The BCIControllerInstance
is meant to address these situations, notably the possible need for multiple controllers. This component version of the BCI controller can be targeted explicitly for registration by behaviours and keyboard shortcuts. LSL stream components can also be specified for greater configuration, but will otherwise be built on demand.
Keyboard Shortcuts
The BCIControllerShortcuts
script is provided to easily bind key presses to the primary BCIController
methods, replacing functionality that used to live directly in the BCI controller.
Stimulus Objects
Controller behaviours rely on the SPO
(Stimulus Presenting Object) script to represent visual instances able to display arbitrary stimulus when prompted, which can be defined by unity events in the inspector or through inheritance. A number of common StimulusEffect
s are implemented that can be used by an SPO
component.
Stimulus Object Fabrication
Many BCI control paradigms utilize a grid of squares or otherwise uniform arrangement of objects. A controller behaviour can use the SPOFactory
class to define this arrangement to be automatically constructed upon activation. Package samples use an SPOGridFactory
variant.