unity-behavior

Manage Unity Behavior graphs, agents, and blackboard variables via reflection-based skills.

Updated Aug 31, 2026
One-click install
npx skills add https://github.com/pikachu0310/codex-agent-ops-public --skill unity-behavior-pikachu0310
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-behavior
Source: https://github.com/pikachu0310/codex-agent-ops-public/tree/main/.agents/skills/unity-skills/skills/behavior
Command: npx skills add https://github.com/pikachu0310/codex-agent-ops-public --skill unity-behavior-pikachu0310

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Wiring NPC and AI decision logic in Unity requires repetitive manual work in the Behavior editor: discovering graph assets, attaching BehaviorGraphAgent components, binding runtime graphs, and setting blackboard variables. This Skill automates the scriptable parts of that workflow while clearly marking what still requires the editor window. ## 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 Unity bakes automatically. - Agent wiring: Add BehaviorGraphAgent components to GameObjects, bind validated runtime graphs, and audit every agent in the loaded scenes. - Blackboard access: Read and set blackboard variables on graph assets or per-agent overrides, with type-aware value parsing for vectors, colors, enums, and object references. - Use Case: When building an NPC AI system, use this Skill to confirm the com.unity.behavior package is installed, locate the patrol graph asset, attach and bind it to each NPC GameObject, then set per-agent blackboard overrides like patrol speed and target. ## Quick Start Ask the AI to check Unity Behavior package status, list available behavior graphs, and bind one to a GameObject with the correct blackboard variable values.

Frequently Asked Questions about unity-behavior

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

FAQPage Schema
How do I set up Unity Behavior graphs for NPC AI?

Install the com.unity.behavior package, create or locate a graph asset, author nodes in the Behavior editor window, then attach a BehaviorGraphAgent to your NPC GameObject and bind the graph. Blackboard variables can then be set per agent or as asset defaults.

How do I set blackboard variables in Unity Behavior?

List the blackboard variables first to get exact case-sensitive names and declared types, then set values on either the graph asset default or an agent-level override. Accepted value shapes depend on the declared type, such as arrays for vectors or hex strings for colors.

Can I edit behavior graph nodes programmatically in Unity?

No, node-level graph editing is not supported because the authoring graph uses serialized polymorphic node lists with version-stamped caches that require the package's internal command pipeline. Author nodes in the Behavior editor window, or duplicate a known-good graph asset instead.

Why does binding a behavior graph fail with RUNTIME_GRAPH_MISSING?

The graph asset has never been compiled, so the nested runtime BehaviorGraph sub-asset does not exist yet. Open the graph once in the Behavior editor window to trigger baking, then retry the binding.

What happens if the com.unity.behavior package is not installed?

Every skill in the module returns a structured PACKAGE_NOT_INSTALLED response pointing at package installation. Install com.unity.behavior, wait for the domain reload to finish, then verify with a status check before using other skills.