FuzzyBrain is a lightweight, data-driven behaviour system for Unity. Build NPC AI with ScriptableObjects and UnityEvents — no state machine code required.FuzzyBrain replaces hand-written if/else chains and boilerplate state machines with a clean, prioritised list of Acts — each one guarded by reusable Condition assets. Drop an Actor component onto any GameObject, open the FuzzyBrain Window, and wire behaviours directly to UnityEvents. No base classes. No code required for the baseline setup.How it works Each Actor holds a ScriptableActivityList — an ordered stack of Acts. Every tick the system walks the list and fires the first Act whose Conditions all pass (FSM mode), or every matching Act (FuSM mode). Acts are sorted automatically by specificity: more conditions means higher priority, so the most precise behaviour always wins without manual ordering.Key featuresData-driven from the ground up — Conditions and Acts are ScriptableObject assets reusable across any number of actors and scenesFSM and FuSM modes — exclusive states or layered multi-system reactions from the same condition setNine built-in 2D conditions covering ground detection, wall detection, falling, idle, cooldowns, and randomisationZero-allocation evaluation — ActContext caches component lookups and deduplicates condition results per tickIGizmoDrawable — spatial conditions draw their query volumes in the Scene view, colour-coded green/red at runtimeAct cooldowns and idle detection built in — wire them without writing a single line of codeOptional FuzzyBrainManager batches evaluations across staggered time buckets for large NPC crowdsFull editor toolset: FuzzyBrain Window, Act Wizard, Condition Wizard, Quick Condition Generator, and Project Settings pageExtend with custom conditions by subclassing Condition — the component is resolved from a cache, never via GetComponent in the hot pathMore info on the webpage:https://fuzzybrain.page.gd/RequirementsUnity 6.0 or laterUniversal Render Pipeline (URP) or Built-in RP, and HDRP. FuzzyBrain contains no rendering code and has no pipeline dependenciesNo third-party dependenciesWhat's includedCore runtime: Actor, Act, Condition, ScriptableActivityList, ActContext, FuzzyBrainManager9 built-in Condition implementations (OnGround, OnSurface, AgainstWall, IsTouchingLayer, FallingCondition, IsStill, CanAct, IdleCondition, RandomRollCondition)Full editor suite: FuzzyBrain Window, Act Wizard, Condition Wizard (Script / Asset / Quick Condition tabs), Project Settings integrationDemo scene: wandering NPC demonstrating FSM mode with built-in conditions and UnityEvent wiringComprehensive documentationArchitecture notesAll behaviour data lives in ScriptableObject assets — safe to share across prefabs and scenesActContext is a readonly struct rebuilt once per tick; no per-frame heap allocations in the hot pathComponent access uses a dictionary cache built on Awake; GetComponent is never called during evaluationCondition results are deduplicated within a tick — a condition shared across multiple Acts calls Verify() exactly onceFuzzyBrainManager is entirely optional; Actors self-tick via Update() when no manager is present, with no behaviour differenceFuzzyBrain is based on my research and work over the years, I built two seperate assets based on the same system in the past. I used AI to refine the idea and to integrate into the editor and then I debugged and further refined the system myself.




