[ Web Proxy ]
URL:
Viewing: https://docs.unity3d.com/ScriptReference/Unity.GraphToolkit.Editor.GraphDatabase.CreateGraph.html [Back]  [Original]

Unity - Scripting API: Unity.GraphToolkit.Editor.GraphDatabase.CreateGraph
Version: Unity 6.5 (6000.5)
    • Supported
    • Legacy
    LanguageEnglish
    • C#

    GraphDatabase.CreateGraph

    Suggest a change

    Success!

    Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

    Close

    Submission failed

    For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

    Close
    Your name Your email Suggestion* Submit suggestion

    Cancel

    Declaration

    public static T CreateGraph(string assetPath);

    Parameters

    Parameter Description
    assetPath The relative path for the new asset (e.g., "Assets/Graphs/MyGraph.mygraph").

    Returns

    T The created graph instance.

    Description

    Creates a new graph asset of type T at the specified file path.

    Use this method to programmatically create a new graph asset of type T at a specific location in the project. The path must be relative to the Unity project folder and must include a valid file extension recognized by the graph importer. If an asset already exists at the specified assetPath, this method overwrites it. This method works similarly to AssetDatabase.CreateAsset but is scoped for Graph assets.


    Web Proxy Viewer  |  New URL  |  Original Page