Living World NPC System


Built-in, URP, and HDRP all work. What NPCs can do ... Setup in minutes, not a week ... Builds the crowd, the area/path/points, agents, animator wiring, and a pooled spawner ... Shared


by Panda Dev


Price History +

Fill Unity scenes with living NPCs that roam, patrol, and work. NavMesh or Transform. Wizards included. No dependencies.

Requirements

  • Unity 6 LTS (6000.0) or newer
  • Mono or IL2CPP
  • Built-in RP, URP, or HDRP
  • No third-party dependencies
  • NavMesh uses Unity’s built-in AI module (NavMeshAgent). Transform mode needs no bake and no floor collider (snaps to ground when a collider exists; otherwise walks at spawn height)

Runtime

  • One WanderingAgent per NPC: Deciding → Moving → Performing → Dwelling, with Blocked retry if a destination is unreachable
  • Movement: NavMesh pathfinding or Transform (ground raycast, optional obstacle sphere-cast)
  • Behaviours: Roam Radius, Roam Area, Seek Point, Patrol, Idle
  • WanderRoutine steps: behaviour, category filter, speed multiplier, complete after N visits or after duration; sequential, random, or weighted
  • WanderPoint: category asset (not a hardcoded enum), priority, capacity with ring slots, cooldown, atomic reservation
  • WanderProfile: speed range, wander radius, dwell/stuck/blocked timing, Speed / IsMoving parameter names
  • WanderActivityDefinition: shared job contract (display name, structure, stages, category)
  • WanderPropBinder: show/hide held meshes from the same definition
  • WanderSpawner: object pooling, weighted entries, spawn area/radius, profile/path/behaviour overrides
  • WanderUpdateManager: single tick loop, configurable DecisionBudgetPerFrame (default 8)
  • No LINQ, no per-frame allocations, reused selection buffers
  • Events: StateChanged, DestinationReached, ActivityChanged; point AgentArrived / AgentLeft (C# + UnityEvent)

Editor

  • Setup Wizard (population + character wiring)
  • Make Selection Wander (existing prefabs: activities, props/sockets, animator)
  • Scene Overview (live state + validation)
  • Create menus: Point, Area (sphere/box), Path, Spawner, Profile, Routine, Activity Definition, starter categories
  • Animator Controller create/update (does not delete existing states)
  • Undo-friendly scene creation; source prefab assets are not mutated (scene instances / spawn templates are configured)

Extensibility

  • Namespace: PandaDev.WanderingNpc
  • IWanderPointSource for custom point picking (quests, factions, time of day)
  • IWanderAnimationDriver if you are not using Unity Animator
  • Play, Pause, Stop, Teleport, ForceNewDestination, SetRoutine / SetProfile / SetArea / SetPath

Not included / not claimed

  • Not a full RPG AI, combat, or dialogue system
  • Does not generate character meshes or animation clips (you supply clips and optionally let the wizard build the controller)
  • NavMesh pathfinding still requires a baked NavMesh in the scene

Living World NPC System

Drop ambient life into any Unity scene. Add one component — or run a wizard — and NPCs start roaming, following routes, visiting points of interest, playing job animations, and showing the right held tool. Works with a baked NavMesh or with direct Transform movement, so it fits a village interior and an empty test scene equally well.

No third-party assets. No extra packages to import. Built-in, URP, and HDRP all work.

What NPCs can do

  • Roam Radius / Roam Area — wander inside a sphere or a box you draw in the scene
  • Patrol — follow a waypoint path (loop, ping-pong, once, or random)
  • Seek Point — walk to a point of interest and perform an activity (mine, farm, sit, fish…)
  • Idle — stand still, or use it as one step in a longer day
  • Routines — chain behaviours into a schedule: work two minutes, stroll the square, sit on a bench, repeat

Setup in minutes, not a week

  • Setup Wizard — movement, behaviour, character prefab, animations, layout, then Create in Scene. Builds the crowd, the area/path/points, agents, animator wiring, and a pooled spawner
  • Make Selection Wander — pick existing characters and apply agent, props, sockets, and an Animator Controller in one undo step
  • Leave the prefab empty to get placeholder capsules and see the system immediately
  • If NavMesh is selected but nothing is baked, the wizard falls back to Transform so NPCs still walk

Animations and held equipment

  • Generate or update an Animator Controller: Idle, Walk (IsMoving), optional Speed, plus job states
  • Structures: Single Loop (bool) or Begin / Loop / Stop (trigger–bool–trigger)
  • Activity Definition assets keep parameter names in one place — point, animator, and prop binder cannot drift (IsMine vs IsMining)
  • Prop Binder shows/hides tools (pickaxe, rod, hoe) when the matching activity is active
  • Hand sockets auto-detected: B-handProp.R/L, then B-hand.R/L, Mixamo names as fallback
  • Avatar field for Humanoid rigs

Crowds that stay cheap

  • Shared update driver — not one Update per NPC
  • Destination decisions are budgeted across frames so a large crowd does not spike a single frame
  • Pooled Wander Spawner with weighted prefab mix; fill and clear without allocating after the first pass
  • Shared Profiles retune speed, radius, and timing for a whole population in one asset

For designers and programmers

Scene gizmos and custom inspectors. Scene Overview validates missing parameters, empty areas, and name mismatches. C# events and UnityEvents on agents and points. Swap point selection (IWanderPointSource) or animation driving (IWanderAnimationDriver) without forking the package.

Includes

Demo scenes and dummy characters, starter point categories, example profiles, routines, and activity definitions.