Blackboard & Eventboard

You are here:
< All Topics
Table of Contents

Variables are identified by a unique GUID in blackboards. You can still get a variable by it’s name but you have to make sure that the name is unique. Also when renaming a variable you’ll need to update your script accordingly.
The same goes for events in eventboards.

Accessing blackboard variables

using FlowReactor;
using FlowReactor.BlackboardSystem;

// reference to blackboard
public BlackBoard variables;

// get variable value of type int with the name health
var _healthVariable = variables.GetVariableByName<FRInt>("health");

Debug.Log(_healthVariable.Value);
Modifying blackboard variables

using FlowReactor;
using FlowReactor.BlackboardSystem;

// reference to blackboard
public BlackBoard variables;

// First we get the variable reference from the blackboard of type FRInt
var _healthVariable = variables.GetVariableByName<FRInt>("health");

// Then we can simply modify the variable
_healthVariable.Value --;

Debug.Log(_healthVariable.Value);
Call event by script

using FlowReactor;
using FlowReactor.EventSystem;

// reference to eventboard
public EventBoard events;

// call the OnEvent1 event in the assigned eventboard
events.CallEventByName("OnEvent1");

Listen to events

Simply use the FlowReactorEventListener component to listen to events. With this component you can easily call public methods on your own custom scripts.

Privacy Settings
We use cookies to enhance your experience while using our website. If you are using our Services via a browser you can restrict, block or remove cookies through your web browser settings. We also use content and scripts from third parties that may use tracking technologies. You can selectively provide your consent below to allow such third party embeds. For complete information about the cookies we use, data we collect and how we process them, please check our Privacy Policy
Youtube
Consent to display content from Youtube
Vimeo
Consent to display content from Vimeo
Google Maps
Consent to display content from Google