Version: Unity 6.4 (6000.4)
Language : English
Replace wires with portals
Organize with nested graphs

Types of nested graphs

Compare the two types of nested graphs, or subgraphs, in Graph Toolkit.

You can use subgraphs to organize and simplify a graph. Two types of subgraphs exist in Graph Toolkit: local subgraphs and asset subgraphs. Learn about the differences and use cases of each.

This information covers the types of subgraphs only. For information on how to create a subgraph, refer to Organize with nested graphs.

Local subgraphs

A local subgraph is a subgraph that exists within another graph, and it is saved to the same graph asset that contains it. Each local subgraph is unique. Changes to one local subgraph don’t affect other local subgraphs. Even if you duplicate a local subgraph node, the duplicate node has a reference to an entirely new local subgraph. Changes to the first subgraph don’t affect the duplicate subgraph.

The recommended use cases for a local subgraph is to use it as a first step to organize a graph or when you need a subgraph but don’t need to reuse its contents.

Note: You can convert a local subgraph to an asset subgraph. For example, if you start with a local subgraph and later decide that you want to reuse it, you can convert it to an asset subgraph. For details on how to convert a local subgraph to an asset subgraph, refer to Organize with nested graphs.

Asset subgraphs

An asset subgraph is a subgraph that exists as a standalone asset file. Each asset subgraph is reusable across multiple graphs. If you duplicate an asset subgraph node, the duplicate node has a reference to that same asset subgraph. A change made to the asset subgraph propagates to all subgraph nodes that reference it.

The benefit of an asset subgraph is its reuse capability. The recommended use case for an asset subgraph is in a scenario where you need to reuse a subgraph in the same graph or across multiple graphs.

Note: You can convert an asset subgraph to a local subgraph. For example, if you start with an asset subgraph and later decide that you don’t need to reuse it, you can convert it to a local subgraph. For details on how to convert an asset subgraph to a local subgraph, refer to Organize with nested graphs.

Additional resources

Replace wires with portals
Organize with nested graphs
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961