docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface INode

    Interface for a node.

    Namespace: Unity.GraphToolkit.Editor
    Assembly: Unity.GraphToolkit.Editor.dll
    Syntax
    public interface INode
    Remarks

    This interface provides methods for accessing input and output ports, which are essential for connecting nodes.

    Properties

    inputPortCount

    The number of input ports on the node.

    Declaration
    int inputPortCount { get; }
    Property Value
    Type Description
    int

    outputPortCount

    The number of output ports on the node.

    Declaration
    int outputPortCount { get; }
    Property Value
    Type Description
    int

    Methods

    GetInputPort(int)

    Retrieves an input port using its index.

    Declaration
    IPort GetInputPort(int index)
    Parameters
    Type Name Description
    int index

    The index of the input port.

    Returns
    Type Description
    IPort

    The input port at the specified index.

    Remarks

    The index is zero-based. The list of input ports is ordered according to their display order in the node.

    GetInputPortByName(string)

    Retrieves an input port using its name.

    Declaration
    IPort GetInputPortByName(string name)
    Parameters
    Type Name Description
    string name

    The unique name of the input port within this node.

    Returns
    Type Description
    IPort

    The input port with the specified name.

    Remarks

    The input port's name is unique within the node's input ports and node options.

    GetInputPorts()

    Retrieves all input ports on the node in the order they are displayed.

    Declaration
    IEnumerable<IPort> GetInputPorts()
    Returns
    Type Description
    IEnumerable<IPort>

    An IEnumerable of input ports.

    GetOutputPort(int)

    Retrieves an output port using its index in the displayed order.

    Declaration
    IPort GetOutputPort(int index)
    Parameters
    Type Name Description
    int index

    The zero-based index of the output port.

    Returns
    Type Description
    IPort

    The output port at the specified index.

    Remarks

    The index is zero-based. The list of output ports is ordered according to their display order in the node.

    GetOutputPortByName(string)

    Retrieves an output port using its name.

    Declaration
    IPort GetOutputPortByName(string name)
    Parameters
    Type Name Description
    string name

    The unique name of the output port within this node.

    Returns
    Type Description
    IPort

    The output port with the specified name, or null if no match is found.

    Remarks

    The output port's name is unique within the node's output ports.

    GetOutputPorts()

    Retrieves all output ports on the node in the order they are displayed.

    Declaration
    IEnumerable<IPort> GetOutputPorts()
    Returns
    Type Description
    IEnumerable<IPort>

    An IEnumerable of output ports.

    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)