Create Blackboards and Manage Keys
Create and link a Blackboard
Create a Blackboard with CreateBlackboard. Pass its path when creating the tree, or use SetBehaviorTreeBlackboard to link it to an existing tree.
Blackboard key rules
Supported key types are Bool, Int, Float, Vector, Rotator, Name, String, Object, Class, and Enum.
ObjectandClasskeys may specifyBaseClass.Enumkeys requireEnum;BaseClassandEnumare rejected for unrelated key types.KeyNamecannot be empty orNone.- A key selector is checked with Unreal’s native filter semantics, including Object/Class base-class restrictions and Enum identity. A same-named key of the wrong type is invalid.
RemoveBlackboardKeyscans the project’s Behavior Trees. If it finds a reference or cannot finish scanning, it refuses to delete the key unless you explicitly accept the risk withbForce=true. For routine cleanup, update the nodes that use the key before trying to remove it.
| Area | Tools |
|---|---|
| Blackboard | AddBlackboardKey, RemoveBlackboardKey |
If you changed a key that a tree uses, validate the associated tree first, then call SaveAsset for the Blackboard. See behavior tree validation and saving.