OnDefineSubgraphNodeOptions(IOptionDefinitionContext)
Called to define the INodeOption s available on subgraph nodes that reference this type of graph. Similar in function to Node.OnDefineOptions.
Read time 1 minuteLast updated 6 days ago
Definition
- Type: Method
- Namespace: Unity.GraphToolkit.Editor
- Assembly: UnityEditor
protected virtual void OnDefineSubgraphNodeOptions(Node.IOptionDefinitionContext context)
Parameters
Provides methods for defining node options.
Remarks
Override this method to add options to all subgraph nodes that point to this type of graph using the provided Node.IOptionDefinitionContext. This method is only applicable to graphs that can act as subgraphs. If the graph is not a subgraph, this method has no effect. To qualify as a subgraph, the graph must be marked with SubgraphAttribute.
Examples
protected override void OnDefineSubgraphNodeOptions(Node.IOptionDefinitionContext context){ context.AddOption<int>("ID") .WithTooltip("The ID of the subgraph.") .Delayed(); context.AddOption<string>("Description") .WithDefaultValue("What is the purpose of this subgraph?") .Delayed();}