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

Unity - Scripting API: GraphAttribute
Version: Unity 6.5 (6000.5)
    • Supported
    • Legacy
    LanguageEnglish
    • C#

    GraphAttribute

    class in Unity.GraphToolkit.Editor

    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

    Description

    Attribute used to declare a graph type by associating it with a file extension and optional configuration options.

    Use this attribute to associate a custom Graph class with a unique file extension and GraphOptions. The extension parameter defines the file extension for the graph assets. This extension must be unique across the project because Unity uses it to select the correct importer. You can also configure additional options using GraphOptions. This attribute is required for any class that inherits from Graph and serves as the entry point for enabling editor support for the graph tool.

    This example keeps the default behavior and adds support for subgraphs by enabling GraphOptions.SupportsSubgraphs.

     [Graph("mygraph", GraphOptions.SupportsSubgraphs)]
     public class MyGraph : Graph { }
    

    Properties

    Property Description
    Extension Gets the file extension associated with the Graph.
    Options Gets the graph configuration options.

    Constructors

    Constructor Description
    GraphAttribute Initializes a new instance of the GraphAttribute class with a file extension and optional graph options.

    Web Proxy Viewer  |  New URL  |  Original Page