ContextNode
A specialized node that serves as a dynamic container for compatible BlockNode instances.
Read time 3 minutesLast updated 6 days ago
Definition
- Type: Class
- Namespace: Unity.GraphToolkit.Editor
- Assembly: UnityEditor
- Inherits from: Node
- Implements: INode
public abstract class ContextNode : Node, INode
Remarks
Context nodes are node structures that group and control a sequence of BlockNode instances. A ContextNode owns a list of BlockNodes. These blocks cannot exist independently in the graph and must always be children of a context node.
To control which block node types are valid for a specific context node type, use the UseWithContextAttribute on the corresponding BlockNode class.
Properties
Property | Description |
|---|---|
| BlockCount | The number of BlockNodes contained in this context node. |
| BlockNodes | An |
Methods
Method | Description |
|---|---|
| AddBlockNode | Adds an existing BlockNode to this context node. |
| ClearBlockNodes | Removes all BlockNodes from this context node. |
| CreateBlockNode | Creates and inserts a new BlockNode into this context node. |
| GetBlock | Retrieves the BlockNode at the specified index in the context node's block list. |
| InsertBlockNode | Inserts an existing BlockNode at the specified index in this context node. |
| RemoveBlockNode | Removes the specified BlockNode from this context node. |