Brains AI

BrainsAI – Modular Tactical AI for Unity


BrainsAI is a modular system for Unity that simulates tactical and responsive enemy or companion behavior — from patrolling and detection to combat and cover systems.
Whether you're building a stealth game, tactical shooter, or immersive RPG, BrainsAI gives you everything you need to bring intelligent NPCs to life.


🧠 Key Features


▶️ Core AI System

  • Smart State Machine – Switches between Idle, Patrol, Alerted, Investigating, and Combat states.
  • Field of View (FOV) – Detects targets in a cone or radius (supports 360°).
    Can be used on non-humanoids like security cameras, turrets, etc.
  • Chase & Distance Control – Use for melee AI (e.g., zombies) or ranged enemies that keep a safe gap.
  • Group-Based Communication – AI can alert others in a shared group. If both agents belong to the same alarm group, they’ll rush to the noise position.
  • Investigation Behavior – Agents investigate intelligently when losing sight of the target.
  • Fake Noise Support – Trigger decoy sounds (like explosions or distractions) to lure agents.
    Affects all groups included in the call.

🛡️ Tactical AI (Advanced Behavior)

Includes all core features, plus:

  • Cover System – Finds safe zones behind obstacles based on the target’s direction.
  • Peek-and-Hide Logic – Agent exposes and hides dynamically to simulate tactical combat.
  • Safe Spot Grids – Automatically generates optimal cover points.
  • Vertical Spot Support – Works on multi-level NavMesh setups.
  • Ideal for shooter enemies that hide, peek, and attack from cover after a few seconds.

🧰 Editor & Utilities

  • Custom Patrol Path Editor – Design patrol routes directly in the scene view.
  • Inspector-Integrated FOV – FOV settings now show directly in the BrainAI inspector.
  • Visual Debug Gizmos – See FOV, attack ranges, and cover points in-scene.
  • Clean Inspector Tools – Includes foldouts, icons, and tooltips for clarity.
  • Static Utility Methods – Helpful gizmo and GUI functions for your own scripts.

✅ Requirements

Requires Unity’s built-in AI Navigation system (NavMesh).
Enable via Window > AI > Navigation or the Package Manager.


💡 Integration Tips

  • Use UnityEvents to trigger alarms, sounds, or VFX on detection.
  • Fully compatible with custom animation setups — just use Animator parameters.
  • Supports dynamic worlds with NavMeshObstacle and NavMeshModifier.
  • Build stealth, shooter, or zombie-style AI by tweaking FOV, patrol, and aggression settings.
  • Create your own AI type by extending BrainAI.
    TacticalAI script is child class of BrainAI and a great starting point — it’s fully commented and easy to learn from.

💬 Support

📧 ultraboltstudio@gmail.com
Feel free to reach out for help, bug reports, or feature requests!