N.E.X.U.S. - NPC EXECUTIVE UNIFIED SYSTEM

A production-ready, hybrid AI architecture. Combine FSM simplicity with Utility AI intelligence. Scale from mobile to hundreds of NPCs on PC.

NpcBrain.UpdateScores()
NpcPool.GetNPC()
NpcLOD.AdjustDetail()

Architecture that scales from 50 to 500 NPCs.

Hybrid AI (FSM + Utility) with Object Pooling and 4-Level LOD.

Hybrid AI Core

3 Behavior Modes: Utility AI (organic), Persecutor (FSM infinite), Territorial (FSM leashed). All configurable.

Performance First

Config caching (10x faster), conditional Sqrt (70% fewer), HashSet O(1) lookups. 500 NPCs on high-end PCs.

Advanced Object Pooling

Gradual preloading, per-type limits, global limits, auto-cleanup. Zero GC spikes.

Modular & Extendable

Clean public API, events for all systems. Add new states or ranged combat easily.

How the systems interact

Clear orchestration via NpcController.

1

NpcController (Orchestrator)

Main entry point. Holds references to all subsystems: Brain, Navigation, Combat, Health, Animation, Audio, VFX, Pool, LOD.

2

NpcBrain (Core Logic)

Pure C# logic. Decides state based on mode (Utility/FSM). Uses cached config for speed.

3

Pooling & LOD

NpcPool reuses instances. NpcLOD reduces update frequency, animation, and audio for distant NPCs.

4

Presentation

NpcAnimationController (procedural). NpcAudioController (3D spatial). NpcVFXController (particles).

Key Features

Capabilities that matter for production.

3 Behavior Modes

Utility AI (personality-driven), Persecutor (infinite chase), Territorial (leashed). Switch via NpcConfig.

Object Pooling

Gradual preloading (instances/frame), per-type limits, hot/cold types, auto cleanup of orphans.

4-Level LOD System

Control brain update interval, animation quality (Full/Simple/Frozen), audio quality (Full/Effects/Muted).

Procedural Animation

No Animator Controller needed. Sine-wave based walk/run, attack windup, death collapse.

3D Spatial Audio

Dedicated sources for movement, action, voice. Dynamic footstep intervals based on speed.

Performance Optimizations

Config caching (32+ vars), TryGetValue, HashSet collections, square distance checks, staggered updates.

Who is this for

Built for professional Unity workflows.

Indie & Solo Developers

Get a robust, tested NPC system out of the box. Focus on your game, not rebuilding AI from scratch.

Mid‑Size Studios

Accelerate prototyping and production. The modular design lets your team work on separate systems simultaneously.

Technical Designers

Exposed Inspector parameters for tuning behavior, combat, audio, and LOD without touching code.

Documentation

Complete API reference for N.E.X.U.S. v2

Quick Overview

N.E.X.U.S. v2.0 - NPC Executive Unified System
Hybrid AI - Utility + FSM (Persecutor/Territorial)
Advanced Object Pooling - Gradual preloading, per-type limits
4-Level LOD - Control brain, animation, audio by distance
Save 150+ Hours - Don't start from scratch
For All Projects - From game jams to studios
Optimized & Tested - 500 NPCs on PC, 80 on mobile
Clean & Documented Code - Easy to customize and extend.

Frequently Asked Questions

Is it compatible with both Input Systems?

Yes. Player detection works with both Legacy and New Input System via the "Player" tag or direct reference.

Can I use only parts of the system?

Absolutely. Each module is decoupled. Use just the pooling, just the LOD, or just the Utility AI.

Does it support network multiplayer?

The core architecture is single-player. You can extend it with your own networking layer.

What’s the performance impact?

Optimized with config caching, TryGetValue, HashSet, and LOD. 500 NPCs take ~21ms on high-end PC.

Are there runtime debugging tools?

Yes. Editor keys (K, J, L) for testing. Gizmos show radii. OnGUI debug displays available.

Is source code included?

Yes. Full C# source is provided and well‑commented for customization.

Start building with a professional NPC system.

Get on Asset Store