ドキュメント

Unity Engine

Unity Engine

GraphAttribute(string, GraphOptions)

Initializes a new instance of the GraphAttribute class with a file extension and optional graph options.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

public GraphAttribute(string extension, GraphOptions options = GraphOptions.Default)

Parameters

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.

The configuration options for the graph. Defaults to GraphOptions.Default if not specified.

Remarks

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.
This example keeps the default behavior and adds support for subgraphs by enabling GraphOptions.SupportsSubgraphs.

Examples

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