unity-behavior

Manage Unity Behavior graphs, agents, and blackboard variables through REST skills.

1.7k|162|Updated Jan 18, 2026
One-click install
npx skills add https://github.com/Besty0728/Unity-Skills --skill unity-behavior
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-behavior
Source: https://github.com/Besty0728/Unity-Skills/tree/main/SkillsForUnity/unity-skills~/skills/behavior
Command: npx skills add https://github.com/Besty0728/Unity-Skills --skill unity-behavior

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Wiring Unity Behavior graphs to agents and reading or writing blackboard variables from outside the editor is tedious and error-prone, especially since a graph asset contains both an authoring graph and a nested runtime graph that are easy to confuse. This Skill exposes the com.unity.behavior package through structured REST skills so AI agents can discover graphs, bind agents, and set blackboard values safely.

Core Features & Use Cases

  • Graph Discovery and Inspection: List behavior graph assets with node counts, blackboard variables, and runtime graph state, or create empty graph assets that are automatically rebaked.
  • Agent Wiring: Add BehaviorGraphAgent components to GameObjects and bind validated runtime graphs in one idempotent call, with scene-wide agent listing for verification.
  • Blackboard Access: Read asset defaults or per-agent overrides and set variable values with type-aware input shapes for vectors, colors, enums, and object references.
  • Use Case: When building NPC AI, ask the agent to list all behavior graphs, attach a BehaviorGraphAgent to each NPC with the correct graph bound, then set per-agent blackboard overrides like patrol speed or target references.

Quick Start

Ask the AI to check behavior_status, list the behavior graphs in the project, and bind one to a named NPC GameObject with a blackboard variable override.

Frequently Asked Questions about unity-behavior

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I bind a Unity Behavior graph to an agent from a script?

Use behavior_agent_add with a GameObject locator and the graphAssetPath, or behavior_agent_set_graph on an existing agent. The skill resolves the nested runtime BehaviorGraph sub-asset and rejects uncompiled graphs with RUNTIME_GRAPH_MISSING.

How do I set blackboard variables on a Unity Behavior graph?

Call behavior_blackboard_list first to get exact case-sensitive variable names and declared types, then call behavior_blackboard_set with a GameObject locator for agent overrides or graphAssetPath for shared asset defaults. Accepted value shapes depend on the declared CLR type.

Does this work without the com.unity.behavior package installed?

The package is optional and accessed entirely through reflection. When absent, every skill returns a structured PACKAGE_NOT_INSTALLED response pointing at package_install, and behavior_status still reports installation state.

Can I add or connect nodes inside a behavior graph programmatically?

No, node-level graph editing is deliberately unsupported because the authoring graph uses versioned SerializeReference polymorphic data requiring the package's command pipeline. Author nodes in the Behavior editor window, then use these skills to inspect and wire the graph.

Why does behavior_blackboard_set behave differently in Play mode?

BehaviorGraphAgent instantiates a private graph copy only in Play mode, so Play-mode writes hit the running instance while Edit-mode writes become agent-level overrides. Reads in Edit mode return shared asset defaults plus the overrides array.