unity-behavior

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

2|Updated May 18, 2026
One-click install
npx skills add https://github.com/pcone-mm/NewFPG --skill unity-behavior-pcone-mm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-behavior
Source: https://github.com/pcone-mm/NewFPG/tree/main/.agents/skills/unity-skills/skills/behavior
Command: npx skills add https://github.com/pcone-mm/NewFPG --skill unity-behavior-pcone-mm

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 lets you discover graph assets, create empty graphs, attach and bind BehaviorGraphAgent components, and read or write blackboard variables directly through structured skill calls. ## Core Features & Use Cases - Graph Discovery and 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 idempotent call, then verify every agent in the scene. - Blackboard Read/Write: Read variable names and declared types from an asset or an agent, then set per-agent overrides or shared graph defaults with type-aware value parsing (vectors, colors, enums, GameObject references). - Use Case: You want to give an NPC AI-driven patrol logic. Check the package status, create or locate a behavior graph, author nodes in the Behavior editor window, attach the agent with the graph bound, then set the NPC's speed and target blackboard variables per instance. ## Quick Start Check whether the Unity Behavior package is installed, then list the behavior graphs in my project and attach one to the NPC GameObject with its blackboard variables configured.

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 agent is reused idempotently 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 call 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 it is missing, 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 storage 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 fail with 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 or direct .asset editing instead.

What is the difference between BehaviorAuthoringGraph and BehaviorGraph assets?

A behavior graph .asset file contains the BehaviorAuthoringGraph editing representation as the main asset and the baked runtime BehaviorGraph as a nested sub-asset. Skills take the file path and resolve the correct object internally, rejecting uncompiled graphs with RUNTIME_GRAPH_MISSING.