XESOFT Asset Store
← All assets
Available now Unity 6 (6000.1+) v2.0.0 Full C# source

Argus

Enemy Awareness, Detection & Stealth AI

A complete stealth enemy AI layer for Unity. Argus guards see, hear, smell, find evidence, build suspicion, remember threats, radio their squad, converge, fight back, get choked out, and explain why they reacted. One drop-in component assembles brain, senses, NavMesh, visuals, and an optional combat module that you can delete entirely if you want to bring your own. Live in-game debugger (F9) shows you exactly what every guard is thinking.

Named for Argus Panoptes, the hundred-eyed guardian who never slept.

See it in action

A nine-part demo, one mechanic per video.

Every Argus mechanic gets its own short demo. Watch the playlist for the full picture, or skim the list to see what is covered.

Playlist · 9 videos Watch on YouTube →
  1. 01Vision & Line-of-Sight
  2. 02Crouching to Break Sight
  3. 03Hearing with Occlusion
  4. 04Light-Aware Detection
  5. 05Body Discovery (Clues + Smell)
  6. 06Squad Alert Propagation
  7. 07Threat Priority Arbitration
  8. 08Force-Alert / Damage Hook
  9. 09Guard Archetypes
No-code or full control

Two ways to use it.

Drop-In

One component, hit Play

Add the ArgusGuard Drop-In facade to any character. It assembles brain, senses, NavMesh locomotion, visuals, and (optionally) the combat module, finds your tagged player by itself, and a live Setup Validator auto-fixes the common mistakes. Pick an archetype from a dropdown (Standard / Vigilant / Distracted) and wire your attack / animation / SFX events like a UI button's OnClick.

Full control

Subscribe and drive your own rig

Argus is an observer. It raises events and exposes CurrentState. Subscribe and drive your own controller, a root-motion rig, custom non-NavMesh locomotion, or implement IArgusGuardReactions for typed bindings. Unpack the Drop-In into its vanilla parts at any time. Add a new sense in about 20 lines.

How it fits together

The observer and the actor stay separate.

Sensors feed an awareness model, which drives a suspicion FSM, which raises state changes. Your adapter (or the Drop-In guard) is the only thing that acts, so Argus slots into any prefab without touching what already works.

SensesVision · Hearing
Smell · Clues
AwarenessPer-source tracks
+ decay / forget
Suspicion FSM5 tiers
threshold transitions
Guard / adapterPatrols, searches,
chases
What's inside

Everything a stealth sandbox needs.

ArgusGuard Drop-In facade

One component assembles the brain, the senses, NavMesh locomotion, the player-facing visuals, and (optionally) combat. Auto-detects your player from the built-in Player tag. Pick an archetype from a dropdown (Standard / Vigilant / Distracted) and the eyes, ears, and nerves come out coherent. Setup Validator auto-fixes the common mistakes (empty target masks, eye height at the feet, missing sensors, hearing occlusion off) in the inspector AND again at runtime Awake, so a broken first run is impossible. Reveal the parts with one toggle, or fully Unpack to a vanilla rig.

Observer architecture

Argus watches the world, builds up awareness, runs a suspicion FSM, picks the most important threat, and raises events. It never touches movement, animation, IK, or ragdoll. A thin adapter, the Drop-In guard, or the optional combat module decides what to do.

Optional combat module

A separate, deletable assembly (XeSoft.Argus.Combat). ArgusCombatant gives spotted guards a first-sight grace window, then ramps accuracy with awareness (panic fire → locked-in), holds fire without line of sight, and holds fire mid-radio-call. ArgusHitscanWeapon (with spread, tracers, and gunshots that emit real SoundBus events), ArgusMeleeWeapon, ArgusHealth, scale-proof ArgusWeaponMount, ArgusProceduralAim. Don't want it? Delete the assembly. Argus's core does not depend on it.

Takedowns and body system

Choke (non-lethal) or kill. Bodies fall, freeze, and automatically become Corpse clue + scent evidence on the existing discovery loop. Carry and hide them in tall grass; non-lethal victims wake up alarmed, search around their own body, and rally the squad. The takedown rulebook is identity-based: openings are the rear arc, mid-radio-call distraction (any angle), and the concealed strike (any angle from inside cover), gated by the guard's awareness OF YOU specifically, not his general alarm level.

5-tier suspicion meter

Unaware to Suspicious to Investigating to Alarmed to Combat, with configurable thresholds, combat hysteresis (enter at 0.95, hold to 0.5), and a sticky Alarmed dwell so guards do not flip-flop. Once in Combat, non-sight stimuli are damped 10x so a stray noise behind cover does not pull a guard off your trail.

Per-source, per-type awareness

Every (source, sense) pair gets its own decaying track. A guard who sees and hears the same target tracks Sight and Sound independently, so a later footstep cannot downgrade an active sighting's priority or quietly drop the guard out of chase. Tracks decay, get forgotten after the configured window, and re-spotting within that window ramps from where it left off.

Four perception senses

Vision (focused + peripheral cones, line-of-sight smoothing, light-aware hook, crouch/cover sample heights, concealment rules). Hearing (global sound bus, wall occlusion, per-material SoundOccluder, HearingProfile presets for Vigilant / Standard / Distracted ears). Smell (persistent scent sources). Clue discovery (corpses, blood, footprints, opened doors).

Threat priority arbitration

A guard chasing a player it can see does not stay fixated on an old corpse clue. Argus separates "how alarmed am I" from "what should I act on" with designer-tunable per-stimulus priority rules. Per-type tier caps mean a smelled corpse reaches Investigating but never Combat; only Sight or Touch can trigger a blind attack. Combat is fed by a separate channel, so a relayed squad alert raises the alarm but cannot trip an attack on a phantom.

Three-mode squad coordination

AlertDirector drives three modes: Independent (guards ignore alerts), Report & Search (classic propagation), and Track & Intercept (live-position sharing while any chaser holds a raw sight-line). The squad sprints and pincers during live contact, then collapses into a coordinated outward-facing ring search the moment contact drops. SquadRallyTrigger defaults to Confirmed Sightings so a heard noise pulls only who hears it. Sustained convergence re-broadcasts every 1.5 seconds while a guard stays hot, capped below Combat so the relay never trips a phantom attack.

Stealth interaction toolkit

Drop-on building blocks for actual stealth gameplay: ConcealmentVolume + StealthConcealment with two fairness rules (cover does not hide you from a guard who watched you go in; a guard inside the same grass patch sees you), NoiseEmitter for bump/collision/code-triggered noise with bursts and cooldowns, Lure for periodic bait, and SoundOccluder for per-material wall acoustics.

In-world reasoning

Three drop-on components that show the AI's state to the player. ArgusAlertnessIndicator floats the classic ?/! above each guard. ArgusGuardBarks speaks per-faction lines from an ArgusBarkTable ScriptableObject (synthesized voice optional). ArgusLastKnownMarker pulses a ghost reticle at the spot the guard thinks you are at, so the player can read "he is searching the wrong place" in one frame.

Crouch and cover stealth

Drop StealthVisibilityHeight on the player and the guard's vision raycast aims at the player's actual sample height. Crouch behind a half-wall to clip the sightline. One bool flips it, no animation rigging required. Pair with VisionSensor.eyeHeight so the guard's eyes sit above low cover.

Light-aware stealth

Drop LightStealthSampler next to a guard's VisionSensor and vision builds awareness slower in shadow. Estimates brightness from scene lights (directional, spot, point with falloff and LOS to each), works in URP, HDRP, and Built-in, with no shadowmap dependency.

One-line damage hook

ApplyStimulus(Custom, position, 1.0) snaps any guard to Combat regardless of vision or LOS. Wire it into your weapon's OnHit, an alarm switch, an explosion VFX, anything that should make the AI react without going through cones. Use a lower intensity for alert-without-combat (a 0.7 from an alarm bell that just puts the squad on edge).

Drop-on detection meter

A billboarded awareness bar above each guard with tier-threshold ticks. Screenshot-readable from any angle, render-pipeline-agnostic. First-class (not demo-only) so you can ship it in your own game.

Presets and ScriptableObject tuning

Every threshold, decay rate, and dwell time lives in a SuspicionConfig asset. Ships with Vigilant and Distracted presets; drag one onto a guard to change its whole personality with no code. HearingProfile gets the same treatment for the ears.

HFSM + Behavior Tree core

A clean hierarchical state-machine driver plus a composable behavior-tree core (Selector, Sequence, Action, Condition leaves) underpin the stealth layer and are reusable for your own AI.

Centralized 10 Hz ticker

One driver ticks every agent, so there is no per-agent Update churn and no FindObjectsOfType scans. Sensors register to static channels and are iterated, not searched.

Changelog Shipped in 2.0

The asset keeps getting bigger.

Argus is a living project, not a one-off drop. Recent additions:

+
ArgusGuard Drop-In facade

One component assembles brain, senses, NavMesh, visuals, and (optionally) combat. Archetype dropdown sets eyes/ears/nerves coherently. Setup Validator auto-fixes the common misconfigs.

+
Optional combat module

A separate, deletable assembly. ArgusCombatant with first-sight grace and awareness-driven accuracy ramp. Hitscan + melee weapons. ArgusHealth, scale-proof ArgusWeaponMount, ArgusProceduralAim.

+
Takedowns and body system

Choke or kill. Bodies become Corpse clue + scent evidence on the same discovery loop. Carry to grass and hide. Non-lethal guards wake up alarmed. Identity-based opening rules (rear / mid-radio / concealed).

+
Radio Time

A spotter must survive a 2-second radio call before the squad learns anything. He plants, tracks, and holds fire during the call. Silence him mid-call and the alert dies with him.

+
Three-mode squad coordination

Independent / Report & Search / Track & Intercept. Live sight-line position sharing during chase. Sprint and pincer while contact is live, ring search when it drops.

+
Stealth interaction toolkit

ConcealmentVolume, NoiseEmitter, Lure, SoundOccluder. Two fairness rules: SEEN-ENTERING-COVER and SHARED-COVER.

+
In-world reasoning indicators

ArgusAlertnessIndicator (?/!), ArgusGuardBarks with per-faction tables and optional synthesized voice, and ArgusLastKnownMarker (the pulsing "he thinks you are HERE" ghost reticle).

+
Hearing profiles

HearingProfile ScriptableObjects with Vigilant / Standard / Distracted presets. Ear-height occlusion rays. Per-material SoundOccluder for wall acoustics.

The marquee feature

Radio Time.

A spotter has to survive a short radio call before the squad learns anything. Two seconds (configurable). He plants, tracks you, and holds fire during the call. If you get him out of the world before the call completes, kill, choke, or just shoot him, the report cancels and the squad never knows you were there.

During the call
  • Plant and track. The spotter stops moving and keeps you in his sights.
  • Hold fire. ArgusCombatant blocks weapon fire while the call is mid-broadcast.
  • Stand ground. ArgusGuard refuses chase orders during the call.
  • Bark the tell. ArgusRadioBark says "Contact! Calling it in!" so the player knows the clock is on.
Silence the call
  • Kill or choke. Either ends the report. The squad never receives the broadcast.
  • Takedown at any angle. Mid-call guards are distracted, so the rear-arc rule waives.
  • Events. ReportStarted / Completed / Cancelled fire from AlertDirector; subscribe and drive your own UI or stealth score.
  • Disable it. Flip requireRadioReport off if your design doesn't want the system at all.
The full loop, optional

Combat and takedowns. Deletable on day one.

The combat module is a separate assembly (XeSoft.Argus.Combat) wired into Argus through a static registration hook. Use it as-is, customize the parts you want, or delete the whole assembly if you'd rather keep Argus a pure observer and write your own combat.

Firefight that respects the AI

ArgusCombatant gives spotted guards a first-sight grace window so getting caught is dramatic, not cheap. Accuracy ramps with awareness from panic fire to locked-in: a half-aware guard misses, a confirmed one is lethal. ArgusHitscanWeapon emits real SoundBus events on every shot so other guards hear the firefight. Never fires through walls. Never on a rumor.

Takedowns with identity-based rules

Choke (non-lethal) or kill. The opening rules check what the guard knows about you specifically, not his general alarm. Openings: the rear arc, mid-radio-call distraction (any angle), or the concealed strike from inside cover (any angle). Bodies become Corpse clue + scent evidence on the existing discovery loop. Carry one to tall grass; non-lethal victims wake up alarmed and rally the squad.

If you want the wires

Subscribe to events. Drive your own controllers.

Prefer to skip the no-code guard? The whole thing is event-driven. Listen for the state change, flip your own behaviors. No inheritance, no base-class lock-in. The single source of truth is agent.CurrentState.

// React to a guard's state. Nothing else required.
void OnEnable() => _agent.FsmStateChanged += HandleState;

void HandleState(FsmStateBase from, FsmStateBase to) {
    switch (to.displayName) {
        case "Unaware":       _patrol.Enable();  _combat.Disable(); break;
        case "Investigating": _search.GoTo(_agent.Awareness.LastKnownPosition); break;
        case "Combat":        _patrol.Disable(); _combat.Enable();  break;
    }
}
Perception

Four senses, one awareness model.

VisionSensor

Two-cone model: a focused cone at full intensity and a wide peripheral cone that ramps off. Distance falloff, occluder linecasts, asymmetric LOS smoothing (instant on first sight, smoothed on loss), and an optional light-based stealth hook so guards see less in the dark.

HearingSensor

Subscribes to a static sound bus. Effective radius scales with event intensity, with per-type weighting (footstep vs gunshot vs yell) and optional per-wall occlusion attenuation.

SmellSensor

Persistent-emission model. Drop a ScentSource on a corpse, campfire, or the player; scents decay over time and are blocked hard by walls. Tuned to lead to investigation, not instant alarm.

ClueDiscoverySensor

Static world evidence: corpses, blood pools, footprints, opened doors, dropped items. Wide notice cone, one-shot or persistent clues, LOS-gated. Drives guards into Suspicious or Investigating.

Inspect any guard, live

A live in-game debugger.

Drop ArgusDebugHud and ArgusDebugWorldOverlay into any scene, press F9, and inspect any guard's reasoning in real time. Tab cycles guards, F9 hides.

  • Three awareness channels (raw, tier-driving, combat) plotted live, so you can see what is feeding what.
  • The priority threat with its cap tier, plus every active track with its own priority and combat-qualifying flag.
  • A per-frame vision breakdown: distance, angle, lighting, LOS blocker, and time-to-Suspicious.
  • An awareness-truthful "Why" narrative that tells you exactly why the meter is moving: "Combat channel rising because: Sight from Player", "Saturated at 1.00 from Sight", "Falling because: stimuli outweighed by decay".
  • Sensor warnings that catch the trap configs (target mask is Nothing, range is zero, no SuspicionConfig assigned) before they cost you an hour.
  • World overlay draws lines from the guard to its last-known position, priority threat, and squad-reported spots in the Game view.
The suspicion meter

Five states, with hysteresis where it counts.

StateAwarenessBehavior
Unaware0.0 – 0.3Patrol or idle
Suspicious0.3 – 0.6Stop, look toward last-known position
Investigating0.6 – 0.9Walk to last-known position
Alarmed0.9 – 0.95Active search, sticky 15s dwell
Combat0.95 → exit 0.5Engage, ~4s persistence after LOS break
Specs

No surprises in the box.

The detection core needs nothing but Unity itself. The optional no-code guard and demo use Unity's AI Navigation, which installs automatically. If your project runs Unity 6, Argus runs.

Get it on the Asset Store
Unity version 6000.1 or newer
Render pipeline Pipeline-agnostic (URP / HDRP / Built-in)
Dependencies AI Navigation + Input System (standard Unity packages, auto-installed)
Source code Full C# source, no DLLs
Tests 129 EditMode tests included
Demo Ready-to-play scene + one-click scene builder
Tick rate 10 Hz, centralized driver
Honest scope

Argus is a perception, suspicion, and alerting brain with an optional, deletable combat/takedown module. It is not an animation pack, an IK system, or a full game template. It does not include a visual graph editor or required character art (a CC0 animated demo is included). You bring your own art, your own animation, and your own locomotion if you want to skip NavMesh; you connect through the Drop-In facade, the events, or the included interfaces. I would rather you know that up front than refund later.

FAQ

Questions, answered.

Does Argus move my enemies for me?

Only if you want it to. The core is a pure observer: it works out what a guard sees and suspects, then raises events. If you would rather not write that glue, the ArgusGuard Drop-In facade drives patrol, investigate, search, and chase on a NavMeshAgent for you out of the box, and the optional combat module handles the firefight.

How do I add it to a new enemy?

Drop-In path: add ArgusGuard Drop-In to a character, pick an archetype from the dropdown, hit Play. Setup Validator auto-fixes the common mistakes inline. Full-control path: implement IArgusGuardReactions for typed bindings, subscribe to the events, drive your own controller, or write a new sense in about 20 lines.

Do I have to use the combat module?

No. The combat module (XeSoft.Argus.Combat) is a separate, deletable assembly wired in through a static registration hook. Delete the assembly and Argus stays a pure observer. The Drop-In facade auto-detects whether combat is available, so removing it does not break anything.

What is Radio Time and why does it matter?

Realistic squad alerting. When a guard spots you, he plants, tracks you, and broadcasts a 2-second (configurable) radio call before the squad learns anything. Kill or knock him out before the call completes and the report cancels, so the rest of the squad never knows you were there. Mid-call guards count as distracted, so takedowns work from any angle, not just the rear arc. Disable the whole system with one toggle on AlertDirector if your design does not want it.

Can I force a guard into combat from an explosion or kill switch?

Yes. ApplyStimulus(Custom, position, 1.0) snaps any guard to Combat regardless of vision or LOS. Wire it into your weapon's OnHit handler, an alarm trigger, an explosion VFX, or any narrative beat. Lower intensity values give you alert-without-combat (e.g. a 0.7 alarm bell that just puts the squad on edge).

Can I tune guard personalities?

Yes. Behavior lives in a SuspicionConfig asset (thresholds, decay, forget time, hysteresis, dwell), and the ears live in a HearingProfile asset. Argus ships Vigilant, Standard, and Distracted presets for both. Drag one onto a guard to retune. No code changes needed.

Is the source included?

Full, readable C# source. No compiled DLLs, no obfuscation. Inline tooltips explain the reasoning behind every default, and a README plus EXTENDING.md document the whole architecture.

Can I break a chase by running behind the guard?

No. In Combat the guard pursues your live position, so you have to genuinely break line of sight and open distance to escape. Concealment rules add a second escape: if a guard did not watch you enter a concealment volume (grass, closet), you are hidden, but a guard who saw you dive in still sees you, and a guard inside the same patch still sees you. It is all tunable, and you can switch any of it off.

Ship the stealth game you've been sketching.

Full source, a ready-to-play demo, and a developer who actually answers.