LoadGraph<T>(string)
Loads a Graph of type T from the asset at the specified path.
Read time 1 minuteLast updated 6 days ago
Definition
- Type: Method
- Namespace: Unity.GraphToolkit.Editor
- Assembly: UnityEditor
public static T LoadGraph<T>(string assetPath) where T : Graph
Parameters
The relative path to the graph asset (for example, "Assets/Graphs/MyGraph.mygraph").
Returns
Type | Description |
|---|---|
| T | The loaded graph instance, or |
Remarks
Use this method to load a graph asset of type from a given asset path. The must be relative to the Unity project folder. This method returns the graph object currently loaded in memory, which might differ from the version on disk if the asset was modified or opened in an editor. This behavior is similar to AssetDatabase.LoadAssetAtPath. For deterministic loading during import, use GraphDatabase.LoadGraphForImporter instead.
TassetPath