Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

build-gtk

БесплатноБез исполняемых скриптовНе проверен

Builds graph tools with Unity Graph Toolkit (GTK) on 6.6+, state machines on 6.7+, and importers for runtime assets. Use this skill for graph, node or state…

Unity-Technologiesот Unity-Technologies★ 1 342 звезды на GitHub

Об этом скилле

Unity Graph Toolkit (GTK)

Build Editor graph tools and state machine tools on Unity's Graph Toolkit module, using only its public API in the Unity.GraphToolkit.Editor namespace.

Important

  • Use the unity cli (unity command --format json) and the unity-cli and unity-pipeline skills for each step.

  • Run C# with unity command script eval --code '<snippet>'. Don't use using directives or unqualified types in the snippet, because the compiler only reads using UnityEngine, and a bare AssetDatabase or Object causes errors (CS0246 / CS0103 / CS0104). return what you want to read; it arrives at data.result.result.

  • Create a restore point you can roll back to if your changes fail.

  • Do only what's asked. Don't change unrelated assets or files.

  • Never leave verification code in the user's script. Never build logging or detection they didn't ask for. See Final step.

  • Avoid long explanations.

  • Graph Toolkit is a built-in module, not a package. Never add com.unity.graphtoolkit to the manifest; it is a deprecated shim. Editor code needs no asmdef reference to use it.

  • Use only the public API. If a draft uses any name from the left column, stop and rewrite it with the right column:

    Never write Write instead
    GraphModel, GraphObject, GraphTool, Stencil, BaseGraphTool Graph and GraphDatabase
    NodeModel, PortModel, WireModel Node, IPort, Wire
    StateModel, TransitionModel, ConditionModel State, ITransition, Condition<T>
    GraphViewEditorWindow, GraphElementsExtensionMethodsCache, ModelView the window is provided; NodeView<T> on 6000.7+ for custom UI
    UnityEditor.Experimental.GraphView, graphViewChanged, Port.Create model the tool as Graph and Node classes; track changes in OnGraphChanged
    com.unity.graphtoolkit in the manifest nothing; the module is built in
  • Spell members exactly. Properties are PascalCase (FirstConnectedPort, IsConnected), attributes take positional arguments, and IDs are Hash128, not strings. Look up any member you have not seen in the docs or references instead of guessing it.

  • Every authoring class is [Serializable] (graph, node, state, condition, self transition) and lives in Editor-only code. Otherwise nodes reset or vanish after a domain reload.

  • Keep runtime assemblies free of Unity.GraphToolkit.Editor. Guard visualization calls with #if UNITY_EDITOR, because the module is Editor-only and any reference to it breaks the player build.

  • Use LoadGraphForImporter (not LoadGraph) inside a ScriptedImporter. The state machine equivalent is StateMachineDatabase.LoadStateMachineForImporter<T>.

  • Wrap every programmatic edit in UndoBeginRecordGraph / UndoEndRecordGraph and call GraphDatabase.SaveGraph. Never mutate the graph inside OnEnable, OnDisable or OnGraphChanged; it throws InvalidOperationException.

Step 1

Before you go forward with a workflow or diagnosis:

  1. Get the Editor version from the user's message, or else from m_EditorVersion in ProjectSettings/ProjectVersion.txt, and pick the API from the table below. A version the user names wins over a newer project. Ask only when neither gives it.
  2. Open and read the documentation page(s) that cover what you intend to do or fix. Where the manual has no page, read the reference file named in Step 3.
  3. Name the file(s) you read in your response.

A missing Unity project or unreachable docs do not block the answer: write the code from this skill and its references, say where each file goes, and name what you could not check.

This is because your training knowledge about Unity might be out of date, incorrect, or for the wrong Unity version. Graph Toolkit changed significantly between 6000.4, 6000.6 and 6000.7.

Editor version Available
Older than 6000.4 Only the retired experimental package (0.x). Its API differs from this skill. Recommend upgrading.
6000.4 to 6000.5 Module present, but without port capacity, type casting, wire and node visualization, USS node styling, or element IDs.
6000.6 The Graph API.
6000.7 and newer Everything above plus the State Machine API, NodeView<T> / StateView<T> / ConditionView<T> custom UI, [GraphMenu] / [BlackboardMenu] context menus, the GraphLogger.GraphChanges change delta, polymorphic and type-following ports, and Blackboard type restriction.

If the user asks for a state machine tool on an Editor older than 6000.7, say plainly that the State Machine API is not available there. Do not emulate it with the Graph API unless asked.

Step 2: Start from the graph tool skeleton

The implement-a-graph-tool.md and implement-nodes.md pages explain this in full. When they cannot be fetched, start from:

[Graph(AssetExtension)] [Serializab
Полный SKILL.md на GitHub

Установить build-gtk в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

SECURITY.mdreferences/graph-api-gaps.mdreferences/runtime-and-visualization.mdreferences/state-machine-api.md

FAQ

Что делает скилл build-gtk?

Builds graph tools with Unity Graph Toolkit (GTK) on 6.6+, state machines on 6.7+, and importers for runtime assets. Use this skill for graph, node or state machine editors, or GraphView migrations. Not for Shader Graph, VFX Graph or Animator.

Как установить скилл build-gtk?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл build-gtk запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить build-gtk с