Create context nodes to organize and contain block nodes in the graph tool.
Context nodes provide context-specific information or functionality and contain only block nodes. A context node inherits all features available in its parent Node class.
This page covers how to implement context nodes only. For information on how to implement block nodes, refer to Implement block nodes for your graph tool. For information about node types, refer to About nodes.
To implement a node, define a class and instantiate the node in your graph.
To implement a context node, define a class that inherits from the ContextNode base class:
[Serializable]
public class MyContextNode : ContextNode
{
}
Review Implement a node to learn how to customize the node with node options, ports, and orientation settings.
To add a context node to the graph:
The context node appears on the canvas. It behaves like any other node in the graph. You can move it, disable it, remove it, or connect it to other nodes or variables.
A new context node doesn’t contain any blocks. Follow the steps in Implement block nodes for your graph tool to add blocks to the context node.