Blackboard
Blackboard manages multiple variables, passing values between graphs and storing temporary values.
Types that Unity supports serialization can be used for variables.
For details, see Unity - Manual: Script serialization.
There is an add variable button and a search name field.
The type icon and name of the variable type.
Edit field for variable value.
- Click the “+” button on the toolbar
- Select Single or List from the variable type dropdown on the type selection menu toolbar.
If you select “List”, you can create a list (variable length array) variable. - Select the type from the type selection menu.
- A variable will be created and you will be in name input mode, so enter the name.
- Confirm with
Enter key
.
You can delete it using one of the following methods:
- Right-click the variable name and select “Delete” from the menu
- Select the variable and press the
Delete key
- Get
Outputs the value of the variable to OutputDataPort. - Set
Stores the value received from InputField into a variable. - Event
Receive an event when the value of a variable changes EventComponent
When an event occurs, output the variable value to OutputDataPort and notify the node that an event has arrived.
To access variables from a graph, you need to open the graph whose variables you want to access in Logic Editor.
To access it, add a node or node component using the following method.
- Select Blackboard tab in side panel.
- Select the Blackboard type tab.
- Start dragging variables
- Drop to Graph View
- Select the node type from the node creation menu.
- Once the node is created, you will be in node name input mode, so enter the name.
- Confirm with
Enter key
.
- Graph view
Space key
Alternatively, right-click and select “Create Node” from the menu. - Enter “Variables” in the search field of the node creation menu
- Select the variables and nodes you want to access.
- Once the node is created, you will be in node name input mode, so enter the name.
- Confirm with
Enter key
.
- Click the “+” button in the node component list such as State node.
- Enter “Variables” in the search field of the node component addition menu.
- Select the variables and node components you want to access.