docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class BlockNode

    Represents a specialized node that can only exist within a ContextNode.

    Inheritance
    object
    Node
    BlockNode
    Implements
    INode
    Inherited Members
    Node.OnEnable()
    Node.OnDisable()
    Node.DefineNode()
    Node.OnDefineOptions(INodeOptionDefinition)
    Node.OnDefinePorts(Node.IPortDefinitionContext)
    Node.nodeOptionCount
    Node.GetNodeOption(int)
    Node.nodeOptions
    Node.GetNodeOptionByName(string)
    Node.inputPortCount
    Node.GetInputPort(int)
    Node.GetInputPorts()
    Node.GetInputPortByName(string)
    Node.outputPortCount
    Node.GetOutputPort(int)
    Node.GetOutputPorts()
    Node.GetOutputPortByName(string)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    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.

    Implements

    INode
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)