Unity - Scripting API: BlockNode
class in Unity.GraphToolkit.Editor
/
Inherits from:Unity.GraphToolkit.Editor.Node
Success!
Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.
Submission failed
For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.
Description
Represents a specialized node that can only exist within a ContextNode.
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
| Property | Description |
|---|---|
| ContextNode | The ContextNode that contains this block node. |
| Index | The index of this block node within the list of blocks in the context node. |
Inherited Members
Public Methods
| Method | Description |
|---|---|
| DefineNode | Defines the structure of the node by building its ports and options. |
| GetInputPort | Retrieves an input port using its index. |
| GetInputPortByName | Retrieves an input port using its name. |
| GetInputPorts | Retrieves all input ports on the node in the order they are displayed. |
| GetNodeOption | Retrieves a node option using its zero-based index. |
| GetNodeOptionByName | Retrieves a node option using its name. |
| GetOutputPort | Retrieves an output port using its index in the displayed order. |
| GetOutputPortByName | Retrieves an output port using its name. |
| GetOutputPorts | Retrieves all output ports on the node in the order they are displayed. |
| OnDisable | Called when the node is removed or when the graph is disabled. |
| OnEnable | Called when the node is created or when the graph is enabled. |
Protected Methods
| Method | Description |
|---|---|
| OnDefineOptions | Called during DefineNode to define the options available on the node. |
| OnDefinePorts | Called during DefineNode to define the input and output ports of the node. |