unity-behavior
Drive Unity Behavior behavior graphs and blackboard variables
How do I install this agent skill?
npx skills add https://github.com/besty0728/unity-skills --skill unity-behaviorIs this agent skill safe to install?
- Gen Agent Trust Hubpass
The skill provides a set of tools for managing Unity Behavior graphs and variables. It includes instructions for installing the necessary Unity package and interacting with the blackboard system. No significant security issues were detected.
- Socketpass
No alerts
- Snykpass
Risk: LOW · No issues
What does this agent skill do?
Unity Behavior Skills
Unity Behavior (com.unity.behavior, validated against 1.0.16): graph asset discovery, agent wiring and blackboard variable access. The package is optional and not a UnitySkills dependency; every skill reaches it through reflection. Parameters come from the schema (GET /skills/schema?category=Behavior&wire=v2); execution and dryRun rules: root SKILL.md.
When to use
- Wiring NPC or AI decision logic
- Binding behavior graphs to agents
- Reading or writing blackboard variables
Rules
- If
behavior_statusreportsinstalled: false, install withpackage_install({"packageName":"com.unity.behavior"}), wait for the Domain Reload, then callbehavior_statusagain. Without the package, every skill returnsMISSING_PACKAGE. - Always call
behavior_graph_listfor agraphAssetPath; never guess one. - Always call
behavior_blackboard_listbeforebehavior_blackboard_set: variable names are case-sensitive and the declared CLR type decides the accepted value shapes. API_MISMATCHmeans the installed package has a different member layout. Do not retry with other arguments; report the version and fall back to the Behavior editor window.- The asset file holds two objects:
BehaviorAuthoringGraph(the editing representation, the main asset) andBehaviorGraph(the baked runtime graph, a sub-asset). Skills take the file path and resolve the right object.behavior_agent_set_graphreturnsRUNTIME_GRAPH_MISSINGfor a graph that was never compiled. behavior_graph_createreturns an empty graph apart from the auto-insertedStartroot. Node editing is not scriptable: use the Behavior editor window (Window > AI > Behavior).- Edit mode vs Play mode:
BehaviorGraphAgentcopies its graph only onInit(), which runs in Play mode. In Edit modebehavior_blackboard_setwith a GameObject writes an agent-level override, reads return the shared asset defaults, and the per-agent values are inoverrides. In Play mode writes affect only that running agent. graphAssetPathonbehavior_blackboard_setchanges the shared default for every agent without an override for that variable.- Out of scope: adding or editing nodes, creating, renaming, retyping or deleting blackboard variables, event channels, subgraph linking, runtime serialization, and agent lifecycle (
Init/Start/End/Restart). For node-level changes, duplicate a known-good graph withasset_duplicate, or edit the.assetYAML with the yaml-editing rules. - Public types (
BehaviorGraphAgent,BehaviorGraph,BlackboardReference,Blackboard) are stable; authoring types (BehaviorAuthoringGraph,GraphAsset) are internal to the package and can move in a package upgrade.behavior_statuslists which types resolved. - Animator state machines belong to
animator_*.component_addattaches the component only;behavior_agent_addalso binds and validates the graph.
Pitfalls
- Do not invent a
graphAssetPath: list the graphs first. - A bad
graphAssetPathinbehavior_agent_addis refused before the component is added, so no half-configured agent is left behind.
Skills Overview
| Skill | Purpose |
|---|---|
behavior_status | Package availability and resolved types; answers even when the package is missing |
behavior_graph_list | List graph assets with node and variable counts |
behavior_graph_info | Node topology and blackboard contract of one graph |
behavior_graph_create | Create an empty graph and bake its runtime data |
behavior_agent_add | Add a BehaviorGraphAgent, optionally bound to a graph |
behavior_agent_get | Read one agent's bound graph, run state and overrides |
behavior_agent_set_graph | Bind a graph to an existing agent |
behavior_agent_list | List every agent in the loaded scenes |
behavior_blackboard_list | List variables of an asset or an agent |
behavior_blackboard_set | Set a variable on an agent or a graph asset |
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/besty0728/unity-skills/unity-behavior">View unity-behavior on skillZs</a>