Class BlockNode
Represents a specialized node that can only exist within a ContextNode.
Implements
Inherited Members
Namespace: Unity.GraphToolkit.Editor
Assembly: Unity.GraphToolkit.Editor.dll
Syntax
[Serializable]
public abstract class BlockNode : Node, INode
Remarks
Use block nodes to define logic or operations that are scoped within a ContextNode.
A block node cannot be added directly to the graph; it must be a child of a valid context node type.
Attempting to instantiate or add a BlockNode
outside of a ContextNode will result in invalid behavior.
To limit which context types can contain a block node, use the UseWithContextAttribute.
Properties
contextNode
The ContextNode that contains this block node.
Declaration
public ContextNode contextNode { get; }
Property Value
Type | Description |
---|---|
ContextNode |
Remarks
Every BlockNode must be part of a ContextNode. This property provides access to that parent context.
index
The index of this block node within the list of blocks in the context node.
Declaration
public int index { get; }
Property Value
Type | Description |
---|---|
int |
Remarks
The index reflects the block's position in the parent ContextNode's block list. The index is zero-based and determines the order in which blocks are displayed.