# OnDefineSubgraphNodeOptions(IOptionDefinitionContext)

> Called to define the INodeOption s available on subgraph nodes that reference this type of graph. Similar in function to Node.OnDefineOptions.

## Definition

* **Type:** Method
* **Namespace:** [Unity.GraphToolkit.Editor](/engine/6000.6/script-reference/unity/graphtoolkit/editor.md)
* **Assembly:** UnityEditor

```csharp
protected virtual void OnDefineSubgraphNodeOptions(Node.IOptionDefinitionContext context)
```

### Parameters

**** (\[IOptionDefinitionContext]\(/engine/6000.6/script-reference/unity/graphtoolkit/editor/node/ioptiondefinitioncontext)): 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](/engine/6000.6/script-reference/unity/graphtoolkit/editor/node/ioptiondefinitioncontext.md). 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](/engine/6000.6/script-reference/unity/graphtoolkit/editor/subgraphattribute.md).

### Examples

```csharp
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();
}
```
