NPC & AI Task System — Priority Queue Scheduler


Three-tier task queue (Normal · Priority · Parallel) with pause/resume, pooling, and optional stat hooks for NPC and AI agents. Zero dependencies — drop in and use.


by PostanteGames


Price History +

TaskSystem is a lightweight, zero-dependency task scheduling framework for Unity. Drop it into any project and orchestrate sequenced, prioritized, pausable work for NPCs, AI agents, workers, quests, animations, or any "do these things in order with interrupts" workflow.

KEY FEATURES

• Three-tier queues — Normal (FIFO), Priority (pre-empts current task), Parallel (runs alongside).
• Pause / resume / cancel — priority interrupts auto-pause; resumed when the priority queue empties.
• ScriptableObject task templates — author once, instantiate per agent, pool freely.
• Treatment types — Instant, OneTime, LongTime, Continuous.
• Progress reporting — Load, Distance, Sequence, Instant, Duration.
• Composite tasks via TaskSequence — chain subtasks with optional waiting and a final task.
• Optional stat hooks (ITaskAgentStats) — energy costs, work speed, mistake rolls, pause notifications. Skip entirely if you don't need them.
• ScriptableObject pooling baked in (IPoolableScriptableObject).
• Project-agnostic — no NPC framework, no behavior tree dependency, no proprietary editor.

DESIGNED FOR

• AI agents that need queued behavior with priority interrupts.
• Workers in sim/tycoon games (Diner Dash-style task chains).
• Quest systems that queue, pause, and resume multi-step objectives.
• Build/craft systems with proportional energy cost over time.
• Any game loop needing "do A, then B; if X happens, do Y first, then resume."

WHAT'S INCLUDED

• Core runtime — full C# source, no DLLs.
• Drop-in TaskController + TaskAgent components — a working actor with zero code.
• Nine sample task types covering every treatment and progress mode.
• Five controller-driven demo scenes plus a one-click DemoHub navigator.
• On-screen HUD overlay and a custom Inspector that shows the live queue.
• README, QuickStart, API reference, CHANGELOG, English XML documentation.

DEPENDENCIES

None. Only UnityEngine. Minimum Unity 2021.3 LTS (developed and tested on Unity 6).

LICENSING

Per-seat license under Unity Asset Store EULA. Royalty-free use in commercial builds.

Support: questions and feature requests welcome through the Asset Store product page.