docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method GetConnectedComponentsOfUndirectedGraph

    GetConnectedComponentsOfUndirectedGraph(Graph<T>)

    Returns the connected components of an undirected graph.

    Declaration
    public static List<List<T>> GetConnectedComponentsOfUndirectedGraph(Graph<T> undirectedGraph)
    Parameters
    Type Name Description
    Graph<T> undirectedGraph

    The undirected graph to analyze.

    Returns
    Type Description
    List<List<T>>

    A list of connected components.

    In This Article
    Back to top
    Copyright © 2026 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)