Unity - Scripting API: Unity.GraphToolkit.Editor.GraphAttribute.GraphAttribute
GraphAttribute Constructor
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.
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.
Declaration
public GraphAttribute(string extension, GraphOptions options);
Parameters
| Parameter | Description |
|---|---|
| extension | The file extension to associate with assets of the graph type. This value must be unique because Unity uses it to select the correct importer. |
| options | The configuration options for the graph. Defaults to GraphOptions.Default if not specified. |
Description
Initializes a new instance of the GraphAttribute class with a file extension and optional graph options.
Use this constructor to define the asset extension and configure the graph. This allows for proper asset recognition and import handling by Unity. The values in GraphOptions support bitwise combination. Combine multiple flags to configure the graph with custom behavior.
<para> This example keeps the default behavior and adds support for subgraphs by enabling <see cref="GraphOptions.SupportsSubgraphs" />. </para>