Skip to content

t1k:unity:dots-ai:behavior-designer-pro

FieldValue
Moduledots-ai
Version2.1.7
Efforthigh
Tools

Keywords: AI, behavior designer, behavior tree

/t1k:unity:dots-ai:behavior-designer-pro

Behavior Designer Pro — DOTS Entity Reference

Section titled “Behavior Designer Pro — DOTS Entity Reference”

Reference for Behavior Designer Pro (BDP) — a behavior tree tool for Unity DOTS by Opsive. This skill covers DOTS Entity mode only — Burst-compiled, job-parallel ECS task systems.

Related skills: dots-ecs (ECS fundamentals) · dots-jobs-burst (Jobs, Burst) · dots-rpg (RPG gameplay) · dots-performance (optimization)


  • Using any Opsive.BehaviorDesigner.* namespace
  • Creating ECS entity tasks (ECSActionTask, ECSConditionalTask)
  • Working with EvaluateFlag, TaskComponent, BranchComponent ECS components
  • Entity baking for behavior trees (auto-bootstrap on world creation — BDP 3+)
  • Conditional aborts with IReevaluateResponder
  • Programmatic tree creation (TreeLogicNodes, ITreeLogicNode, fluent TreeBuilder)
  • Performance throttling (EvaluateFlag + AIUpdateTier integration)
  • Migrating BDP 2 → BDP 3 (3rd-generic wrapper refactor)

  • Unity: 6000.3+ (Unity 6)
  • Entities package: 1.4.5+
  • BDP package: com.opsive.behaviordesigner 3.0.2 (pinned; see migration guide for upgrade notes)
  • Platform: All except WebGL (Entities/Burst limitation)
  • Assembly: DOTSBDP asmdef (references Opsive.BehaviorDesigner.Runtime, Opsive.Shared.Runtime)

ModuleReferenceCoverage
Conceptsconcepts-guide.mdTree flow, task types, composites, decorators, conditional aborts
Entity Tasksentity-task-guide.mdECS tasks (6 files each), Burst systems, jobs, flags, reevaluation
Entity Bakingentity-baking-guide.mdBaking workflow, spawning, BDP 3 auto-bootstrap
Tree Creationtree-creation-guide.mdProgrammatic tree building, TreeBuilder API, BattleDemo archetypes
DOTS RPG Integrationdots-rpg-integration-guide.md17 BDP tasks, 3-layer architecture, system ordering bridges
Performanceperformance-throttling-guide.mdEvaluateFlag throttling, AIUpdateTier, scaling strategies
Migrationmigration-2-to-3-guide.mdBDP version migration recipes (institutional memory)

BehaviorTreeSystemGroup (SimulationSystemGroup)
├── BDPEvaluateFlagThrottleSystem (before group — disables EvaluateFlag for skip-frame entities)
├── BeforeTraversalSystemGroup (OrderFirst)
│ └── ReevaluateTaskSystemGroup (conditional abort reevaluation)
├── InterruptSystemGroup
│ └── InterruptTaskSystemGroup
├── TraversalSystemGroup
│ ├── TraversalTaskSystemGroup (custom task systems — 15 total)
│ └── EvaluationSystem (tree traversal)
└── EvaluationCleanupSystem (OrderLast — re-enables EvaluateFlag)
Layer 1: PERCEPTION (AISystemGroup)
AIUpdateTierSystem → DetectionSystem → AggroSystem
↓ [BDPAfterPerceptionBridge]
Layer 2: BEHAVIOR (BehaviorTreeSystemGroup)
BDPEvaluateFlagThrottleSystem → BDP internal → Custom task systems
↓ [BDPBeforeNavigationBridge]
Layer 3: EXECUTION (Navigation + Combat)
AgentNavigationBridgeSystem → AutoAttackSystem

→ See references/ecs-components-guide.md for the full ECS component table (~600-800B overhead per entity), EvaluateFlag throttle pattern, and task status flow.

using Opsive.BehaviorDesigner.Runtime; // BehaviorTree API
using Opsive.BehaviorDesigner.Runtime.Tasks; // TaskStatus, ECSActionTask, ECSConditionalTask
using Opsive.BehaviorDesigner.Runtime.Components; // ECS: TaskComponent, BranchComponent, EvaluateFlag
using Opsive.BehaviorDesigner.Runtime.Groups; // BehaviorTreeSystemGroup
using Opsive.GraphDesigner.Runtime; // ITreeLogicNode, IAuthoringTask

  • To create an ECS task, inherit ECSActionTask<TSystem, TComponent, TComponentFlag> or ECSConditionalTask<TSystem, TComponent, TComponentFlag> with Burst-compiled ISystem (BDP 3 — 3rd generic is the per-task flag struct)
  • Do NOT override the Flag property — BDP 3 base class implements it via the 3rd generic. Override causes CS0108 warning
  • Each entity task = 4-6 files: Authoring, Component (IBufferElementData), Flag (IEnableableComponent), System (ISystem), Job (IJobEntity), optional ReevaluateSystem+Flag
  • To bake behavior trees, place BehaviorTree on a prefab in a SubScene — BDP 3 auto-bootstraps the baked-tree system on world creation; no explicit call needed
  • To create trees programmatically, set bt.TreeLogicNodes, bt.EventNodes (with Start node), then bt.Serialize()
  • To force system ordering, use empty bridge ISystem structs with [UpdateAfter]/[UpdateBefore]
  • All task systems MUST be [DisableAutoCreation] — BDP manages their lifecycle
  • All task systems MUST include EvaluateFlag in their query (BDP template enforces this) -> See references/gotchas-scaling-guide.md for ECS task gotchas and performance scaling table (<100 to 2000+ units).
FileContents
concepts-guide.mdTree flow, task types, composites, decorators, conditional aborts
entity-task-guide.mdECS tasks (6 files each), Burst systems, jobs, flags, reevaluation
entity-baking-guide.mdBaking workflow, spawning, BDP 3 auto-bootstrap
tree-creation-guide.mdProgrammatic tree building, TreeBuilder API, BattleDemo archetypes
dots-rpg-integration-guide.md17 BDP tasks, 3-layer architecture, system ordering bridges
performance-throttling-guide.mdEvaluateFlag throttling, AIUpdateTier, scaling strategies
ecs-components-guide.mdECS component table, EvaluateFlag throttle, task status flow
gotchas-scaling-guide.mdECS task gotchas, vendor bug workarounds, performance scaling table
advanced-guide.mdAdvanced BDP patterns and techniques
migration-2-to-3-guide.mdBDP version migration recipes (institutional memory)
bdp-task-generic-guide.mdBDPTaskData<TPayload> — form-b rationale, exact API, all shipped payload types, MANDATORY [assembly: RegisterGenericComponentType] registration gotcha (runtime Unknown Type on missing entry), Patrol/WaitDuration/Flee examples, 3 use-cases, step-by-step new-task guide, write-back gotcha