build-gtk
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseUnity Graph Toolkit (GTK)
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 namespace.
Unity.GraphToolkit.Editor使用Unity Graph Toolkit模块的公共API(位于命名空间中)构建编辑器图工具和状态机工具。
Unity.GraphToolkit.EditorImportant
重要提示
- 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. Avoid long explanations.
- Before you go forward with a workflow or diagnosis, open and read the reference file(s) named in that workflow and the Topic map page(s) that cover the thing you intend to do. Name the file(s) you read in your response. This is because your training knowledge about Unity might be out of date, incorrect, or for the wrong Unity version, and Graph Toolkit changed between 6000.4, 6000.6 and 6000.7.
- 创建一个还原点,以便在修改失败时回滚。
- 仅执行要求的操作。不要修改不相关的资源或文件。避免冗长的解释。
- 在开始执行某个工作流或进行诊断前,请打开并阅读该工作流中提到的参考文件,以及涵盖你要操作内容的主题索引页面。请在回复中列出你阅读过的文件。这是因为你关于Unity的训练知识可能已经过时、不正确,或者适用于错误的Unity版本,而Graph Toolkit在6000.4、6000.6和6000.7版本之间有变更。
References
参考文档
Read these as needed. Paths are relative to this skill's folder.
- — the Graph API surface: Graph, Node, port and option builders, context and block nodes, subgraphs, variables, validation, toolbar and context menus. Read before writing any graph-tool code.
references/graph-api.md - — the State Machine API (Unity 6.7+): StateMachine, State, Condition, transitions and rules, self transitions, custom views. Read whenever states, transitions or conditions are involved.
references/state-machine-api.md - — compiling a graph or state machine into a runtime asset with a ScriptedImporter, and showing live execution in the graph editor. Read when the user wants the authored data used in the game or debugged at runtime.
references/runtime-and-visualization.md - — the mistakes that survive compilation. Read before handing off, and whenever the user reports a compile error, an empty Add menu, a missing node, or an exception.
references/pitfalls.md
请按需阅读以下文档。路径均相对于本技能的文件夹。
- — Graph API概览:Graph、Node、端口与选项构建器、上下文节点与块节点、子图、变量、验证、工具栏和上下文菜单。编写任何图工具代码前请阅读本文档。
references/graph-api.md - — State Machine API(Unity 6.7+):StateMachine、State、Condition、转场与规则、自转场、自定义视图。涉及状态、转场或条件时请阅读本文档。
references/state-machine-api.md - — 如何使用ScriptedImporter将图或状态机编译为运行时资源,以及在图编辑器中显示实时执行状态。当用户需要在游戏中使用创作的数据或在运行时调试时请阅读本文档。
references/runtime-and-visualization.md - — 能通过编译的常见错误。交付前请阅读本文档,当用户报告编译错误、添加菜单为空、节点缺失或异常时也请阅读。
references/pitfalls.md
Step 1: Check the Editor version and pick the API
步骤1:检查编辑器版本并选择API
Read in before writing code. Graph Toolkit is
an Editor module, so there is no package to install. is a deprecated shim
and must not be added to the manifest.
m_EditorVersionProjectSettings/ProjectVersion.txtcom.unity.graphtoolkit| Editor version | What is 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 this skill documents. |
| 6000.7 and newer | Everything above plus the State Machine API, |
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.
编写代码前,请读取中的。Graph Toolkit是编辑器模块,因此无需安装任何包。是已弃用的兼容包,严禁添加到清单中。
ProjectSettings/ProjectVersion.txtm_EditorVersioncom.unity.graphtoolkit| 编辑器版本 | 可用功能 |
|---|---|
| 6000.4以下 | 仅包含已停用的实验包(0.x),其API与本技能不同,建议升级。 |
| 6000.4 至 6000.5 | 已包含模块,但缺少端口容量、类型转换、连线与节点可视化、USS节点样式以及元素ID功能。 |
| 6000.6 | 本技能所记录的Graph API。 |
| 6000.7及更高版本 | 包含上述所有功能,此外还支持State Machine API、 |
如果用户要求在低于6000.7的编辑器版本上开发状态机工具,请明确说明该版本不支持State Machine API。除非用户明确要求,否则不要使用Graph API模拟实现。
Mental model
心智模型
-
Graph Toolkit is an authoring framework only. It draws and persists graphs; it never executes them. The user writes the runtime data model and the code that runs it, usually fed by a ScriptedImporter.
-
One asset type peror
Graphsubclass, identified by the file extension passed toStateMachineor[Graph("ext")].[StateMachine("ext")] -
Discovery is by reflection. Node, state and condition classes in the same assembly as the graph class are listed automatically. Classes in other assemblies opt in withor
[UseWithGraph]. Abstract classes are never listed.[UseWithStateMachine] -
Every authoring class isand lives in an Editor-only assembly, either an
[Serializable]folder or an asmdef restricted to the Editor platform.Editor -
Only the public API compiles for users. If a name from the left column appears in a draft, stop and use the right column:
Never write Write instead ,GraphModel,GraphObject,GraphTool,StencilBaseGraphToolandGraphGraphDatabase,NodeModel,PortModelWireModel,Node,IPortWire,StateModel,TransitionModelConditionModel,State,ITransitionCondition<T>,GraphViewEditorWindow,GraphElementsExtensionMethodsCacheModelViewthe window is provided; on 6000.7 for custom UINodeView<T>,UnityEditor.Experimental.GraphView,graphViewChangedPort.Createno equivalent; model the tool as andGraphclassesNodein the manifestcom.unity.graphtoolkitnothing; the module is built in
- Graph Toolkit仅是一个创作框架。它负责绘制和持久化图,绝不执行图。用户需要自行编写运行时数据模型以及执行该模型的代码,通常通过ScriptedImporter提供数据。
- 每个或
Graph子类对应一种资源类型,通过传递给StateMachine或[Graph("ext")]的文件扩展名进行标识。[StateMachine("ext")] - 类型发现通过反射实现。与图类位于同一程序集的节点、状态和条件类会自动列出。其他程序集中的类需要通过或
[UseWithGraph]特性主动声明。抽象类永远不会被列出。[UseWithStateMachine] - 所有创作类都标记有,且位于仅编辑器程序集中——可以是
[Serializable]文件夹,也可以是限制为Editor平台的asmdef文件。Editor - 用户只能使用公共API进行编译。如果草稿中出现左列的名称,请立即停止并改用右列的对应项:
| 禁止使用 | 请改用 |
|---|---|
| |
| |
| |
| 窗口已内置提供;6000.7版本中使用 |
| 无等效项;请使用 |
清单中的 | 无需添加;该模块已内置 |
Workflow A: build a graph tool
工作流A:构建图工具
Read now, before writing code; member names and builder chains come from
there, not from memory. Read as well when step 5 applies.
references/graph-api.mdreferences/runtime-and-visualization.md-
Graph class.with a
[Graph(AssetExtension)] [Serializable] class MyGraph : Graph. Add apublic const string AssetExtensionstatic method that calls[MenuItem("Assets/Create/...")]. PassGraphDatabase.PromptInProjectBrowserToCreateNewAsset<MyGraph>()in the attribute when subgraphs are wanted.GraphOptions.SupportsSubgraphs -
Node classes.. Override
[Serializable] class MyNode : Nodeand end every port builder chain withOnDefinePorts. Override.Build()for inspector-editable settings, and read them insideOnDefineOptionswithOnDefinePortswhen ports depend on them. CallGetNodeOptionByName(name).TryGetValue<T>(out var v)on count-like options so ports are not rebuilt on every keystroke. Use.Delayed()for placement, icon, default title and USS.[Node("Category/Path", iconPath, title, stylesheet)] -
Validation. Overrideand report with
OnGraphChanged(GraphLogger logger),logger.LogErrororLogWarning, passing the offending node or port as context so the marker appears on it. Never mutate the graph in this callback; put the fix in aLogattached to the message, a menu item, or the importer.GraphLogAction -
Structure, as requested. Context and block nodes, subgraphs, blackboard variables, type casting through, a toolbar element, or a context menu. Details in
IsConnectionAllowed.graph-api.md -
Output. Aregistered on the same extension compiles the graph into a plain runtime asset. The shape is always the same:
ScriptedImportercsharpvar graph = GraphDatabase.LoadGraphForImporter<MyGraph>(ctx.assetPath); // never LoadGraph here if (graph == null) return; // bad path or type: log and stop var start = graph.GetNodes().OfType<StartNode>().FirstOrDefault(); if (start == null) return; // OnGraphChanged already reported it var next = start.GetOutputPortByName("Next").FirstConnectedPort?.GetNode(); // null when unconnected var titlePort = next.GetInputPortByName("Title"); titlePort.TryGetValue<string>(out var title); // the value typed on the node if (titlePort.IsConnected) { /* resolve titlePort.FirstConnectedPort.GetNode() upstream instead */ } ctx.AddObjectToAsset("Runtime", runtime); ctx.SetMainObject(runtime);The runtime asset and its assembly must not reference; keepUnity.GraphToolkit.EditorIDs asHash128. Debug views and code-built graphs are inHash128.runtime-and-visualization.md -
Verify as described below.
在编写代码前,请先阅读;成员名称和构建器链都来自该文档,请勿凭记忆编写。如果涉及步骤5,请同时阅读。
references/graph-api.mdreferences/runtime-and-visualization.md- 图类。 定义,并包含
[Graph(AssetExtension)] [Serializable] class MyGraph : Graph。添加一个public const string AssetExtension静态方法,调用[MenuItem("Assets/Create/...")]。如果需要子图支持,请在特性中传入GraphDatabase.PromptInProjectBrowserToCreateNewAsset<MyGraph>()。GraphOptions.SupportsSubgraphs - 节点类。 定义。重写
[Serializable] class MyNode : Node方法,且每个端口构建器链都必须以OnDefinePorts结尾。如需在Inspector中编辑设置,请重写.Build();当端口定义依赖这些设置时,在OnDefineOptions中通过OnDefinePorts读取。对计数类选项调用GetNodeOptionByName(name).TryGetValue<T>(out var v),避免每次按键都重建端口。使用.Delayed()特性指定节点的菜单位置、图标、默认标题和USS样式。[Node("Category/Path", iconPath, title, stylesheet)] - 验证。 重写方法,通过
OnGraphChanged(GraphLogger logger)、logger.LogError或LogWarning上报问题,并将出错的节点或端口作为上下文传入,以便标记显示在对应元素上。严禁在此回调中修改图;请将修复逻辑放在附加到消息的Log、菜单项或导入器中。GraphLogAction - 按需构建结构。 包括上下文节点、块节点、子图、黑板变量、通过实现的类型转换、工具栏元素或上下文菜单。详情请参阅
IsConnectionAllowed。graph-api.md - 输出。 注册在同一扩展名上的将图编译为普通的运行时资源。代码结构基本固定:
ScriptedImporter
csharp
var graph = GraphDatabase.LoadGraphForImporter<MyGraph>(ctx.assetPath); // never LoadGraph here
if (graph == null) return; // bad path or type: log and stop
var start = graph.GetNodes().OfType<StartNode>().FirstOrDefault();
if (start == null) return; // OnGraphChanged already reported it
var next = start.GetOutputPortByName("Next").FirstConnectedPort?.GetNode(); // null when unconnected
var titlePort = next.GetInputPortByName("Title");
titlePort.TryGetValue<string>(out var title); // the value typed on the node
if (titlePort.IsConnected) { /* resolve titlePort.FirstConnectedPort.GetNode() upstream instead */ }
ctx.AddObjectToAsset("Runtime", runtime); ctx.SetMainObject(runtime);运行时资源及其程序集严禁引用;类型的ID请保持为。调试视图和代码构建的图请参阅。
6. 按照下文所述进行验证。
Unity.GraphToolkit.EditorHash128Hash128runtime-and-visualization.mdWorkflow B: build a state machine tool (Unity 6.7 and newer)
工作流B:构建状态机工具(Unity 6.7及更高版本)
Read now; there is no manual walkthrough for this API yet, so that
file and the Script Reference are the only accurate sources for its member names.
references/state-machine-api.md- State machine class. plus a menu item calling
[StateMachine(AssetExtension)] [Serializable] class MySM : StateMachine.StateMachineDatabase.PromptInProjectBrowserToCreateNewAsset<MySM>() - States. . States have no ports; the state machine owns the transitions. Options declared in
[Serializable] class Patrol : Stateappear only in the Graph Inspector.OnDefineOptions - Conditions. with
[Serializable] [Condition("Health")] class HealthCondition : Condition<float>when a comparison operator is wanted. Derive fromprotected override bool DisplayComparisonDropdown => truedirectly for a valueless trigger. Group (And/Or) and variable conditions are built in; do not reimplement them.Condition - Optional. Custom self transitions (+
SelfTransition), custom UI through[Transition(...)]andStateView<T>, andConditionView<T>/[StateMachineMenu]entries.[ConditionMenu] - Validation. Override . Same rules as
OnStateMachineChanged(StateMachineLogger logger).OnGraphChanged - Output. A loads with
ScriptedImporter, then walksStateMachineDatabase.LoadStateMachineForImporter<MySM>, each state'sGetStates(), each transition'sGetOutgoingTransitions(), and each rule'sGetRules()tree. That tree always contains the built-in kinds as well as the user's classes, so the compiler must handleRootCondition(recurse, honourIGroupCondition) andOperation(IVariableCondition,Variable.Name,Comparison) before matching customValuetypes.Condition<T>
请立即阅读;目前该API尚无分步指南,因此该文档和脚本参考是成员名称的唯一准确来源。
references/state-machine-api.md- 状态机类。 定义,并添加一个调用
[StateMachine(AssetExtension)] [Serializable] class MySM : StateMachine的菜单项。StateMachineDatabase.PromptInProjectBrowserToCreateNewAsset<MySM>() - 状态。 定义。状态没有端口;转场由状态机统一管理。在
[Serializable] class Patrol : State中声明的选项仅显示在图Inspector中。OnDefineOptions - 条件。 定义;如果需要比较运算符,请添加
[Serializable] [Condition("Health")] class HealthCondition : Condition<float>。对于无值的触发器类型条件,请直接继承自protected override bool DisplayComparisonDropdown => true。分组(与/或)条件和变量条件已内置,请勿重新实现。Condition - 可选功能。 自定义自转场(+
SelfTransition)、通过[Transition(...)]和StateView<T>实现自定义UI,以及ConditionView<T>/[StateMachineMenu]菜单项。[ConditionMenu] - 验证。 重写,规则与
OnStateMachineChanged(StateMachineLogger logger)相同。OnGraphChanged - 输出。 通过
ScriptedImporter加载状态机,然后遍历StateMachineDatabase.LoadStateMachineForImporter<MySM>、每个状态的GetStates()、每个转场的GetOutgoingTransitions()以及每个规则的GetRules()树。该树始终包含内置类型和用户自定义类,因此编译器必须先处理RootCondition(递归处理,遵循IGroupCondition属性)和Operation(IVariableCondition、Variable.Name、Comparison),再匹配自定义的Value类型。Condition<T>
Editing a graph from code
通过代码编辑图
When a menu item, generator or tool builds or edits an asset, bracket the mutations:
/ → → , ,
, → → .
The state machine equivalents are , ,
and . Mutating inside , ,
or throws .
LoadGraphCreateGraphUndoBeginRecordGraph("Action")AddNodeConnectport.TrySetValueCreateVariableGraphDatabase.SaveGraph(graph)UndoEndRecordGraph()UndoBeginRecordStateMachineConnect(fromState, toState)SaveStateMachineUndoEndRecordStateMachineOnEnableOnDisableOnGraphChangedOnStateMachineChangedInvalidOperationException当菜单项、生成器或工具需要构建或编辑资源时,请按以下结构包裹修改操作:/ → → 、、、 → → 。状态机的对应方法为、、和。在、、或中修改图/状态机会抛出。
LoadGraphCreateGraphUndoBeginRecordGraph("Action")AddNodeConnectport.TrySetValueCreateVariableGraphDatabase.SaveGraph(graph)UndoEndRecordGraph()UndoBeginRecordStateMachineConnect(fromState, toState)SaveStateMachineUndoEndRecordStateMachineOnEnableOnDisableOnGraphChangedOnStateMachineChangedInvalidOperationExceptionDecisions
决策指南
| The user wants | Do this | Why |
|---|---|---|
| Limit how many wires a port accepts | | Ports default to multiple wires, so the framework enforces the limit only if you declare it |
Connect an | Override | Ports of different types refuse to connect by default; the graph only records the wire, your importer converts |
| One port that accepts several types, like Shader Graph | 6000.7+: | |
| An execution-flow port with no data type | | Flow ports carry no value; typing them invites wrong connections |
| Hide a node type from the Add menu | Make it | Every concrete node class in the graph's assembly is listed automatically |
| Group nodes in the Add menu | | The attribute's first argument is a folder path, not the node's title |
Know what changed, like the old | 6000.7+: | |
| Several kinds of subgraph | | Without the attribute the main graph type doubles as the only subgraph type |
| Ports on a subgraph node | Blackboard variables of kind | Subgraph nodes have no |
| Node icon or USS look | | The Editor picks the |
| Show which node runs and what flows through ports at runtime | GraphVisualization API, see | Graph Toolkit has no runtime; the game must push state back into the open window |
| An Animator-like state machine editor | Workflow B on 6000.7+. On 6000.6, explain it is not available | The State Machine API does not exist before 6000.7 |
| Extra UI inside a node | | |
| 用户需求 | 实现方式 | 原因 |
|---|---|---|
| 限制端口可接受的连线数量 | 在端口构建器中使用 | 端口默认支持多条连线,因此仅当你显式声明时,框架才会强制执行限制 |
将 | 重写 | 不同类型的端口默认拒绝连接;图仅记录连线,由你的导入器负责类型转换 |
| 一个端口支持多种类型,类似Shader Graph | 6000.7+:在构建器上使用 | |
| 无数据类型的执行流端口 | 不带类型地调用 | 流端口不携带值,为其指定类型容易导致错误连接 |
| 在添加菜单中隐藏某个节点类型 | 将其设为 | 图所在程序集中的所有具体节点类都会自动列出 |
| 在添加菜单中对节点分组 | 使用 | 该特性的第一个参数是文件夹路径,而非节点标题 |
获知变更内容,类似旧的 | 6000.7+:使用 | |
| 支持多种子图类型 | 在主图上添加 | 没有该特性时,主图类型会同时作为唯一的子图类型 |
| 子图节点上的端口 | 在子图内部定义 | 子图节点没有 |
| 节点图标或USS样式 | 使用 | 编辑器在深色主题下会选择带 |
| 在运行时显示哪个节点在执行、端口中传输的内容 | 使用GraphVisualization API,参阅 | Graph Toolkit没有运行时;游戏必须将状态推回打开的编辑器窗口 |
| 类似Animator的状态机编辑器 | 6000.7+版本使用工作流B。6000.6版本请说明该功能不可用 | State Machine API在6000.7之前的版本中不存在 |
| 节点内部的额外UI | 6000.7+版本使用 | |
Constraints
约束条件
- Use member names exactly as the references spell them: properties are PascalCase
(,
FirstConnectedPort), attributes take positional constructor arguments, and IDs areIsConnected. When a member is not listed in the references, look it up at the URL pattern below rather than guessing its name or casing, because a guessed member fails to compile and the user cannot tell a typo from a missing feature.Hash128 - Link to the Script Reference or manual instead of restating them, so the answer stays correct when the docs change.
- Keep runtime assemblies free of , and put visualization code inside a runtime assembly under
Unity.GraphToolkit.Editor, because the module is Editor-only and any reference to it breaks the player build.#if UNITY_EDITOR - Keep the user's existing tool structure and do not restyle or reorganize nodes that were not mentioned, because node and port names are lookup keys that importers and saved assets depend on.
- Do not use Graph Toolkit internals or private types as a workaround, because they are not accessible from user code and change without notice. If the public API cannot do something, say so and point at the community thread list below.
- 必须严格按照参考文档中的拼写使用成员名称:属性采用PascalCase命名(如、
FirstConnectedPort),特性使用位置构造函数参数,ID类型为IsConnected。如果某个成员未在参考文档中列出,请通过下方的URL模式查找,切勿猜测名称或大小写——因为猜测的成员会导致编译失败,用户无法区分是拼写错误还是功能缺失。Hash128 - 请链接到脚本参考或官方手册,而非复述内容,这样当文档更新时,答案仍能保持正确。
- 运行时程序集严禁引用;可视化代码应放在运行时程序集中,并使用
Unity.GraphToolkit.Editor包裹,因为该模块仅编辑器可用,任何对它的引用都会导致玩家构建失败。#if UNITY_EDITOR - 保持用户现有工具的结构,不要修改未提及节点的样式或重组方式,因为节点和端口名称是导入器和已保存资源依赖的查找键。
- 请勿使用Graph Toolkit的内部或私有类型作为变通方案,因为用户代码无法访问这些类型,且它们会随时变更而不另行通知。如果公共API无法实现某项功能,请明确说明,并指向下方的社区讨论列表。
Verify
验证
- Read and check the code against it before showing it to the user.
references/pitfalls.md - The project compiles with no errors. If the Unity CLI is available, use it to build or run the Editor headless; otherwise ask the user to focus the Editor and report the Console.
- Create an asset from the new menu item, double-click it, add every node or state type from the Add menu, connect them, save, close and reopen. The Console must show no errors or warnings.
- With an importer, select the asset and confirm the produced runtime object is the main asset in
the Inspector.
3b. When you wrote runtime code (an executor, a debug view), add lines that prove the behaviour, such as the state entered or the node executed, enter Play mode, and read them. Remove or guard them once the behaviour is confirmed.
Debug.Log - Re-read and fix anything it flags.
references/pitfalls.md - If a step fails or the Console reports an error, go back and reread the reference file and the Topic map page for that step before retrying; the fix is usually a member name or a version gate you missed.
- 在向用户展示代码前,请阅读并对照检查代码。
references/pitfalls.md - 项目编译无错误。如果可用Unity CLI,请使用它构建或以无头模式运行编辑器;否则请用户聚焦编辑器窗口并提供控制台输出。
- 通过新的菜单项创建资源,双击打开,添加添加菜单中的所有节点或状态类型,连接它们,保存、关闭再重新打开。控制台不得出现任何错误或警告。
- 如果使用了导入器,请选中资源并确认生成的运行时对象是Inspector中的主资源。
3b. 如果你编写了运行时代码(执行器、调试视图),请添加语句以验证行为,例如状态进入或节点执行的日志,进入播放模式后查看日志。确认行为正确后,删除或包裹这些日志语句。
Debug.Log - 重新阅读,修复其指出的所有问题。
references/pitfalls.md - 如果某个步骤失败或控制台报错,请在重试前返回并重新阅读对应步骤的参考文档和主题索引页面;问题通常是你遗漏了某个成员名称或版本限制。
Final report
最终报告
Give the user a short checklist: the files you created or changed and where they go, how to create
and open the first asset, what the importer produces, and which Editor version the code targets. List
what is left for them to decide or do next, such as more node types, the runtime executor, or the debug
view, and any Console error you could not verify because no Editor was available.
向用户提供一份简短的检查清单:你创建或修改的文件及其位置、如何创建并打开第一个资源、导入器生成的内容,以及代码目标的编辑器版本。列出需要用户自行决定或后续完成的事项,例如更多节点类型、运行时执行器或调试视图,以及因没有编辑器而无法验证的控制台错误。
Topic map
主题索引
Prefer over ; it is faster and lands on the exact page. Only fetch what you need.
Replace before fetching:
WebFetchWebSearch<VERSION>- and
docs.unity.com/en-us/engine/<VERSION>: the project's Editor version fromdocs.unity3d.com/<VERSION>/Documentation, for exampleProjectSettings/ProjectVersion.txtor6000.6.6000.7 - : the samples package version shown in the Package Manager, for example
docs.unity3d.com/Packages/com.unity.graphtoolkit-samples@<VERSION>.0.6
Pages, all under , served as markdown when the
suffix is kept:
https://docs.unity.com/en-us/engine/<VERSION>/.md- Manual index:
manual/extending-the-editor/gtk-index.md - Implementing a graph tool: , with child pages
manual/extending-the-editor/gtk-index/implementing-a-graph-tool.md,implement-a-graph-tool.md,implement-nodes.md,implement-node-options.md,implement-context-nodes.md,implement-block-nodes.md,type-cast-ports.md,add-custom-toolbar-actions.md,add-subgraph-support.mdunder that foldergraph-processing.md - Graph window and panels: , with
manual/extending-the-editor/gtk-index/landing-graph-interface.md,graph-window.md,blackboard.md,graph-inspector.mdunder itminimap.md - Script Reference: and
script-reference/unity/graphtoolkit/editor/<type>.md, all lowercase, generic arity dropped (.../<type>/<member>.mdforcondition.md). Example:Condition<T>. State machine types exist fromscript-reference/unity/graphtoolkit/editor/graph/ongraphchanged.md. The older form6000.7also resolves, as HTML.https://docs.unity3d.com/<VERSION>/Documentation/ScriptReference/Unity.GraphToolkit.Editor.<Type>.html - Samples: . Install
https://docs.unity3d.com/Packages/com.unity.graphtoolkit-samples@<VERSION>/manual/index.htmlby name in the Package Manager, then import Texture Maker (importer), Visual Novel Director (custom runtime and debug view) or Dungeon Graph Generator (building a graph from code).com.unity.graphtoolkit-samples - Community: https://discussions.unity.com/tag/graph-toolkit
优先使用而非;它速度更快且能直接定位到目标页面。仅获取你需要的内容。获取前请替换:
WebFetchWebSearch<VERSION>- 和
docs.unity.com/en-us/engine/<VERSION>:项目的编辑器版本,来自docs.unity3d.com/<VERSION>/Documentation,例如ProjectSettings/ProjectVersion.txt或6000.6。6000.7 - :包管理器中显示的示例包版本,例如
docs.unity3d.com/Packages/com.unity.graphtoolkit-samples@<VERSION>。0.6
所有页面均位于路径下,保留后缀时将以markdown格式返回:
https://docs.unity.com/en-us/engine/<VERSION>/.md- 手册索引:
manual/extending-the-editor/gtk-index.md - 实现图工具:,该文件夹下包含子页面:
manual/extending-the-editor/gtk-index/implementing-a-graph-tool.md、implement-a-graph-tool.md、implement-nodes.md、implement-node-options.md、implement-context-nodes.md、implement-block-nodes.md、type-cast-ports.md、add-custom-toolbar-actions.md、add-subgraph-support.mdgraph-processing.md - 图窗口与面板:,其下包含
manual/extending-the-editor/gtk-index/landing-graph-interface.md、graph-window.md、blackboard.md、graph-inspector.mdminimap.md - 脚本参考:和
script-reference/unity/graphtoolkit/editor/<type>.md,均为小写,省略泛型参数数量(.../<type>/<member>.md对应Condition<T>)。示例:condition.md。状态机类型从script-reference/unity/graphtoolkit/editor/graph/ongraphchanged.md版本开始提供。旧格式6000.7也可访问,返回HTML格式。https://docs.unity3d.com/<VERSION>/Documentation/ScriptReference/Unity.GraphToolkit.Editor.<Type>.html - 示例:。在包管理器中按名称安装
https://docs.unity3d.com/Packages/com.unity.graphtoolkit-samples@<VERSION>/manual/index.html,然后导入Texture Maker(导入器)、Visual Novel Director(自定义运行时与调试视图)或Dungeon Graph Generator(通过代码构建图)。com.unity.graphtoolkit-samples - 社区:https://discussions.unity.com/tag/graph-toolkit