docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class INodeExtensions

    Provides extension methods related to nodes and ports in a graph.

    Inheritance
    object
    INodeExtensions
    Inherited Members
    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
    public static class INodeExtensions
    Remarks

    This static class defines utility methods that simplify interactions between graph components, such as retrieving the INode associated with a given IPort.

    Methods

    GetNode(IPort)

    Retrieves the INode that owns the specified port.

    Declaration
    public static INode GetNode(this IPort port)
    Parameters
    Type Name Description
    IPort port

    The port to get the owning node from.

    Returns
    Type Description
    INode

    The INode that contains the specified port.

    Remarks

    This is helpful when analyzing graph structures, especially when traversing connections. The returned node provides context for the port’s role in the graph.

    Examples
    IPort port = somePortReference;
    INode node = port.GetNode();
    
    Debug.Log($"Port '{port.name}' belongs to node: {node}.");
    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)