Add advanced control flow, randomization, cooldown, repeat, and timeout nodes to your BTGraph Behavior Trees. Free extension pack designed for modular AI and professional Unity projects.Upgrade your Behavior Trees with advanced control flow and randomization nodes built specifically for BTGraph.This free extension pack adds essential AI building blocks such as weighted random selection, shuffle sequences, cooldown decorators, repeat policies, delay, and timeout control — all designed for clean, modular, production-ready AI systems in Unity.If you are building enemy AI, NPC logic, decision systems, or gameplay behaviors using Behavior Trees, this pack gives you the missing control structures needed to create dynamic, non-repetitive, and professional behavior logic.What This Pack AddsRandomization NodesRandom SelectorWeighted Random SelectorShuffle SequenceCreate non-deterministic and natural AI behaviors with proper per-instance memory and optional deterministic seeding.Control Flow DecoratorsRepeat (X Times)Repeat Until SuccessRepeat Until FailureControl execution loops safely and predictably.Time-Based DecoratorsCooldownTimeoutDelayAdd timing constraints to your Behavior Tree branches without custom scripting.Designed for Professional AI ArchitectureNo gameplay-system coupling (no animation, audio, or VFX dependencies)Fully modular extension for BTGraphMulti-agent safe runtime behaviorNo static mutable stateDeterministic random option via seed keyZero runtime reflectionClean editor registration via BTGraph public hookRuntime and editor assemblies properly separatedThis pack focuses purely on Behavior Tree control logic, making it suitable for:Enemy AINPC decision systemsUtility AI integrationsStrategy or simulation gamesLarge-scale AI systemsModular AI frameworksWhy Use This Pack?Many minimal Behavior Tree implementations lack advanced control structures like weighted selection or proper timeout handling.This pack fills that gap with:Production-grade execution semanticsStable selection during running statesProper lifecycle handling (Enter / Tick / Reset)Predictable timeout behaviorClean integration with BTGraph editorIncluded Demo SceneA lightweight demo scene is included to showcase:Weighted random branch selectionCooldown constraintsShuffle execution orderTimeout handlingThe demo is minimal and focused on logic clarity.RequirementsRequires BTGraph (base package).No BTGraph Pro required.Perfect Companion ToUtility AI Pack for BTGraphPerception Pack for BTGraphTactics Pack for BTGraphPackage TypeExtension Pack for BTGraph (Behavior Tree framework for Unity)Editor-only registration hook integration.No runtime reflection.No dependency on BTGraph Pro.Included Node TypesComposite NodesRandom SelectorWeighted Random SelectorShuffle SequenceDecorator NodesRepeat (X Times)Repeat Until SuccessRepeat Until FailureCooldownTimeoutDelayExecution SemanticsAll nodes follow BTGraph lifecycle conventions:Proper Enter / Tick / Reset handlingStable child selection during Running statePer-instance state storage via NodeStateStoreMulti-agent safe executionNo mutable static runtime stateDeterministic Random SupportWeighted and uniform random nodes support deterministic execution when a Seed Key (Blackboard int) is provided.No global RNG stateInstance-isolated random streamsPredictable behavior for debugging and replay systemsTimeout & Timing BehaviorTimeout only overrides children that are still RunningNo premature failure before child tickDelay and Cooldown handle edge cases (<= 0 values) safelyTiming based on Unity time system (Time.time)Performance CharacteristicsO(1) tick cost for decoratorsO(n) selection cost on Enter for weighted and shuffle nodesNo per-tick allocationsCached buffers for weight and shuffle arraysNo LINQ usage in runtime pathsDesigned for scalability across multiple AI agents.Editor IntegrationRegistered via BTGraph public editor registryNo assembly scanningNo core source modifications requiredDeterministic search ordering (Group → Order → Title)Runtime and Editor separated via asmdef assembliesFolder StructureAssets/BTGraphControlFlowFree/Runtime/Editor/Demo/Documentation/Fully self-contained and removable without affecting BTGraph core.Assembly DefinitionsBTGraph.ControlFlow.RuntimeBTGraph.ControlFlow.EditorExplicit dependency references to BTGraph base runtime and editor assemblies.CompatibilityUnity 2021+ (recommended)Compatible with BTGraph base packageCompatible with other BTGraph extension packsDoes not require BTGraph ProDemo SceneIncludes a minimal showcase demonstrating:Weighted selectionCooldown constraintsShuffle executionTimeout behaviorNo console spam. No Pro dependency.Use CasesEnemy AINPC logicStrategy / RTS AISimulation systemsModular AI frameworksDecision-making layersUtility AI branch gatingAI-assisted drafting was used only for early documentation text. The final submitted documentation was manually rewritten and technically verified by the publisher. All runtime/editor code, nodes, sample scenes, prefabs, and package structure were authored, reviewed, and tested by the publisher. No AI-generated art, audio, models, or marketing media are included in this package.



