AddSubgraphNode(Graph, Vector2)
Creates and adds a new subgraph node referencing an existing Graph asset.
Read time 1 minuteLast updated 6 days ago
Definition
- Type: Method
- Namespace: Unity.GraphToolkit.Editor
- Assembly: UnityEditor
public ISubgraphNode AddSubgraphNode(Graph subgraph, Vector2 position)
Parameters
Returns
Type | Description |
|---|---|
| ISubgraphNode | The newly created subgraph node. |
Remarks
Enclose this method with Graph.UndoBeginRecordGraph and Graph.UndoEndRecordGraph to add this operation to the undo stack and to update the graph view with the changes.