unity-behavior

Inspect, create, and wire Unity Behavior graphs and blackboard variables on agents.

Updated May 20, 2026
One-click install
npx skills add https://github.com/yuse168/Roomies --skill unity-behavior-yuse168
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: unity-behavior
Source: https://github.com/yuse168/Roomies/tree/main/.agents/skills/unity-skills/skills/behavior
Command: npx skills add https://github.com/yuse168/Roomies --skill unity-behavior-yuse168

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Wiring Unity Behavior (com.unity.behavior) graphs to NPCs and managing blackboard variables normally requires manual editor work and deep knowledge of the package's two-object asset structure. This Skill exposes graph discovery, agent binding, and blackboard read/write operations as scriptable skills, with reflection-based access that degrades gracefully when the package is missing. ## Core Features & Use Cases - Graph Discovery & Inspection: List behavior graph assets with node counts and runtime state, and inspect one graph's node breakdown, blackboard variables, and subgraph dependencies. - Agent Wiring: Add a BehaviorGraphAgent to any GameObject and bind a validated runtime graph in one call, with idempotent behavior and pre-validation that prevents half-configured agents. - Blackboard Read/Write: List variables on a graph asset or an agent, then set values with automatic type coercion for scalars, vectors, colors, enums, and Unity object references. - Use Case: You are building NPC AI for a scene. Run behavior_status to confirm the package, create a graph with behavior_graph_create, author nodes in the Behavior editor window, then attach and bind agents with behavior_agent_add and tune per-agent blackboard overrides with behavior_blackboard_set. ## Quick Start Ask the AI to check whether the Unity Behavior package is installed and list all behavior graph assets in the project.

Frequently Asked Questions about unity-behavior

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

FAQPage Schema
How do I attach a behavior graph to a GameObject in Unity?▼

Use behavior_agent_add with the GameObject name, instanceId, or path plus the graphAssetPath. The graph is resolved and validated before the component is added, and an existing BehaviorGraphAgent is reused instead of duplicated.

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 use behavior_blackboard_set. Pass a GameObject locator for an agent-level override or graphAssetPath to change the shared asset default.

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 lists 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 return API_MISMATCH?▼

API_MISMATCH means the installed package version has a different internal member layout than the validated 1.0.16 baseline. Do not retry with different arguments; report the version mismatch and use the Behavior editor window instead.

What is the difference between edit mode and play mode blackboard writes?▼

In edit mode, writes to a GameObject create agent-level overrides shown in the Inspector, while reads return shared asset defaults. In play mode, writes go to the agent's private running graph instance and take effect immediately on that agent only.