← Back to projects
tools · 2025 · Ongoing

Behavior Tree Framework

UnityC#AIEditor Tool
Behavior Tree Framework

Project Overview

A Behavior Tree Framework for Unity, supporting Unity 6 and earlier versions. It provides a node-based editor, runtime debugging, and a robust variable system to streamline AI development.

Role: Software Engineer

Game Engine: Unity

Programming Language: C#

Technologies: UXML, USS, Photoshop

Date: 2024 – 2025

Why I Built It

As we added more enemies to Tank Lore, our state machine system started getting messy. It was modular and reusable, but creating connections between states and keeping track of them became something we struggled to manage.

A behavior tree solved the structural problem, and building it as a visual, node-based editor inside Unity, inspired by Unreal Engine's, meant enemy logic could be read and changed at a glance instead of traced through code. It has driven Tank Lore's AI ever since, and later became the backbone of the game's meta progression as well.

Core Framework

A modular system for creating, managing, and executing behavior trees.

Node System

Over 17 customizable node types for defining AI logic. Easily extendable via C# to add new node behaviors.

Nodes Inline View

Script Generation

Generate C# scripts directly from the graph editor with boilerplate methods and comments pre-populated, reducing setup time.

Debugging

Real-time node state visualization during play mode, highlighting active, succeeded, and failed nodes for rapid troubleshooting.

Blackboard

A shared data store accessible by nodes. Inspector dropdown prevents typos and simplifies variable selection.

User Interface

An Unreal Engine-inspired editor UI built with UXML/USS for intuitive tree creation, linking, and management.

Variable System

Optional variable identifiers for nodes, similar to WPF's x:Name, enabling external scripts to reference nodes by name.

Download & Setup

Visit the GitHub repository for detailed instructions on installation, setup, and contribution guidelines.