Blackboard
The Blackboard is a centralised storage system for global variables and parameters within a Dynamic Dungeon graph. It allows you to expose specific values to the Unity Inspector and share parameters between different nodes or even between parent graphs and sub-graphs.
Key Concepts
- Properties: Variables defined in the Blackboard. Currently supported types are Float and Int.
- Global Scope: Blackboard properties are accessible throughout the entire graph.
- Exposed Properties: By adding a property to the Blackboard, it becomes visible in the
DungeonGeneratorcomponent in the Unity Inspector, allowing for quick iteration without opening the graph editor.
Using the Blackboard
- Open the Blackboard: In the Dungeon Designer window, click the Blackboard button in the toolbar to open the panel.
- Add a Property: Click the + button and select a type (e.g., Float).
- Name the Property: Give your property a unique, descriptive name (e.g.,
CaveDensity). - Reference in Graph: Drag the property from the Blackboard panel directly into the Graph area. This will create an Exposed Property node.
Exposed Property Node
This node acts as a bridge between the Blackboard and your graph logic.
| Port | Type | Direction | Description |
|---|---|---|---|
| Output | Float / Int | Output | The current value of the Blackboard property. |
Benefits
- Consistency: Use a single
SeedorGlobalScalevalue across dozens of noise nodes. - Iteration: Change world parameters (like humidity, room size, or spawn rates) directly from the Unity Inspector while in Play Mode.
- Sub-Graph Communication: Sub-graphs can read from the parent's blackboard, allowing for modular but configurable behaviours.