Version: Unity 6.4 Alpha (6000.4)
LanguageEnglish
  • C#

UseWithGraphAttribute

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

Cancel

Description

Attribute used to specify which Graph types are compatible with the decorated Node class.

This attribute links a specific Node class to one or more Graph types, enabling fine-grained control over which graph types support the node. This allows framework authors to explicitly declare node compatibility across different kinds of graphs and ensures that only valid nodes are available for use in each graph context. By default, nodes defined in the same assembly as the graph are considered compatible and available. In this default setup, the UseWithGraphAttribute is not required. However, when a graph uses GraphOptions.DisableAutoInclusionOfNodesFromGraphAssembly, this attribute must be used to declare which Graph types support the node. This attribute affects editor behaviors such as graph item library population and helps prevent the accidental use of unsupported nodes.

Constructors

Constructor Description
UseWithGraphAttribute Initializes a new instance of the UseWithGraphAttribute class with the specified supported graph types.

Public Methods

Method Description
IsGraphTypeSupported Determines whether the specified graph type supports the node decorated with this attribute.