Tactical AI Kit is a behavior-tree-driven combat AI framework for Unity 2022.3+. It gives you a complete, extensible architecture for building combat agents — ships, drones, turrets, soldiers — without locking you into a specific physics or movement system.
WHAT'S INCLUDED
A behavior tree engine with Sequence, Selector (reactive), and Parallel composites. Each agent gets its own runtime clone of the tree at startup — no shared state corruption between agents.
8 combat action nodes: pursue rear arc, face target, move to target, fire weapon, flee, patrol, strafe, orbit, and evasive maneuver.
6 condition nodes: has target, health below threshold, in orbit range, being tailed, in target rear arc, has ally.
Utility AI targeting via TargetPicker — OverlapSphere candidate scan with team-aware claim spreading, a commitment threshold to prevent target flapping, and a pluggable scorer interface.
4 built-in scorers: distance, health, damage output, and BusyEnemyScorer — a scorer that preferentially targets enemies already engaged with your teammates, producing emergent flanking behaviour without any explicit coordination code.
4 clean interface contracts your game objects implement: ITargetable, IDamageable (with directional hit vector for armour and shield systems), IWeaponSystem, and IAgentAgility (speed-scaled turn rate). No forced inheritance. Plug into your own MonoBehaviours.
One-click 4v4 demo scene via Tools > TacticalAIKit > Setup Demo Scene. Ships have directional damage (rear hits deal 2×), per-ship agility variation, and teamwork via the BusyEnemyScorer. Demonstrates real emergent behaviour: 2v1 flanking, last-ship evasion, critical-health fleeing.
Full BT diagnostics — throttled logging per agent, Tools menu toggles, and a BTDiagnosticsEnabler component for in-scene control.
Fast Enter Playmode ready — all static state resets cleanly with Domain Reload disabled.
IS THE CONTENT CUSTOMIZABLE?
Yes, extensively. Tactical AI Kit ships with full C# source code, no DLLs:
- Add new BT action or condition nodes by inheriting BTLeaf. One method to implement.
- Add new scorers by implementing ITargetScorer. One method to implement.
- Combine scorers in a WeightedScorerSet ScriptableObject — no code.
- All four interfaces are thin contracts. Implement on your own MonoBehaviours. Vary IAgentAgility.CurrentTurnRate dynamically based on speed, damage, energy, or anything else.
- IDamageable.TakeDamage passes a hit direction vector so you can implement directional armour, shield arcs, or hit-location effects.
- The BehaviorTreeAsset editor draws your tree recursively and lets you pick node types from a menu — no manual type entry.
- Two assembly definitions isolate TacticalAIKit's compilation.
IS IT SUITABLE FOR A PARTICULAR GENRE?
Tactical AI Kit is built for real-time Rigidbody-based combat. It fits cleanly into:
- Spaceship and aerial dogfights
- Drone swarm combat
- Top-down vehicle combat
- Tower defence wave enemies
- Any game where you want group tactics (flanking, focus fire, evasion) without hard-coding coordination
KEY FEATURES
- Reactive BTSelector: higher-priority branches (flee, evade) always pre-empt lower ones the moment their condition is true
- Per-agent runtime BT clone: no shared-state bugs between agents
- BTActionPursueRearArc: forward-only thrust with anti-slip damping for arcing turns — agents pursue the point behind the target
- BusyEnemyScorer: emergent 2v1 flanking with no explicit coordination code
- IAgentAgility: expose speed-scaled or damage-scaled turn rate per agent, read every tick
- Directional damage via IDamageable.TakeDamage hit direction vector
- One-click demo scene generator (Tools > TacticalAIKit > Setup Demo Scene)
- BTDiagnostics: throttled per-agent BT logging, Tools menu toggles, in-scene enabler component
- Full C# source code, no DLLs, no obfuscation
- Two assembly definitions for fast incremental compilation
- Fast Enter Playmode compatible (Domain Reload disabled)
- Unity 2022.3 LTS or newer
- Zero external dependencies