unreal-behavior-trees
Build NPC AI in Unreal Engine 5 with Behavior Trees and Blackboards: composites (Selector/Sequence), tasks, decorators, services, and running the tree from an AIController. Use when creating enemy/NPC AI, BT_/BB_ assets, custom BTTask or BTService nodes, or when the user mentions Behavior Tree, Blackboard, AIController, BTTask, decorator, or service.
npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill unreal-behavior-trees --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Unreal Behavior Trees Author NPC decision-making in UE5 with Behavior Trees driven by a Blackboard: structure the tree with composites, gate branches with decorators, keep state current with services, and run it from an AIController. Targets **UE 5.4+**. ## When to use - Use when building enemy/NPC AI: creating a `BT_`/`BB_` asset pair, structuring Selector/Sequence branches, adding decorators (conditions) and services (periodic updates), writing custom `BTTask`/`BTService` nodes, or wiring an AIController to run the tree. - Use when the project has Behavior Tree (`BT_`) and Blackboard (`BB_`) assets and an `AAIController`. **When *not* to use:** the *concept* of AI (FSM vs BT vs steering, cross-engine) → `game-ai`. Pure navigation/pathing math is engine navmesh (BT's `MoveTo` uses it). Simple one-off logic may be cheaper as a small state machine than a full tree. ## Core workflow 1. **Create the pair:** a Blackboard (`BB_`) holds typed keys (the AI's memory: `TargetActor`, `LastKnownLocation`, `bIsInvestigating`); a Behavior Tree (`BT_`) references that Blackboard. 2. **Possess and run.** An `AAIController` possesses the pawn and calls `RunBehaviorTree(BT)`, which also initializ
- When to use
- Core workflow
- Patterns
- 1. AIController that runs the tree (C++)
- 2. A priority tree (node structure)
- 3. Updating the Blackboard from code (e.g. on seeing the player)
- Pitfalls
- References
- Related skills
What does the unreal-behavior-trees skill do?
Build NPC AI in Unreal Engine 5 with Behavior Trees and Blackboards: composites (Selector/Sequence), tasks, decorators, services, and running the tree from an AIController. Use when creating enemy/NPC AI, BT_/BB_ assets, custom BTTask or BTService nodes, or when the user mentions Behavior Tree, Blackboard, AIController, BTTask, decorator, or service.
How do I install it?
Run `npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill unreal-behavior-trees --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From gamedev-skills/awesome-gamedev-agent-skills, a repository with 406 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
