docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface ISubgraphNode

    Interface for a specialized node that references a subgraph and exposes its input and output variables as ports.

    Inherited Members
    INode.inputPortCount
    INode.GetInputPort(int)
    INode.GetInputPorts()
    INode.GetInputPortByName(string)
    INode.outputPortCount
    INode.GetOutputPort(int)
    INode.GetOutputPorts()
    INode.GetOutputPortByName(string)
    Namespace: Unity.GraphToolkit.Editor
    Assembly: Unity.GraphToolkit.Editor.dll
    Syntax
    public interface ISubgraphNode : INode
    Remarks

    Subgraph nodes act as entry points to reusable graphs. These nodes mirror the subgraph's inputs and outputs as ports on the node to allow the integration of subgraphs within a main graph. The subgraph must be a valid Graph type. The main graph must support subgraphs through SupportsSubgraphs, and the subgraph must be linked to the main graph using the SubgraphAttribute.

    Methods

    GetSubgraph()

    Retrieves the subgraph linked to this node.

    Declaration
    Graph GetSubgraph()
    Returns
    Type Description
    Graph

    The Graph instance that this node references.

    Remarks

    Call this method to access the subgraph that provides the behavior for this node. The subgraph defines input and output variables that appear as ports on the subgraph node. This method does not create or modify the subgraph.

    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)