OnDefineOptions(IOptionDefinitionContext)
Called during Node.DefineNode to define the options available on the node.
Read time 1 minuteLast updated 6 days ago
Definition
- Type: Method
- Namespace: Unity.GraphToolkit.Editor
- Assembly: UnityEditor
protected virtual void OnDefineOptions(Node.IOptionDefinitionContext context)
Parameters
Provides methods for defining node options.
Remarks
This method is called before Node.OnDefinePorts. Override this method to add node options using the provided Node.IOptionDefinitionContext.
Examples
protected override void OnDefineOptions(IOptionDefinitionContext context){ context.AddOption<bool>( optionName: "myBoolId", optionDisplayName: "My Bool"); context.AddOption( optionName: "Label", dataType: typeof(string), optionDisplayName: "labelId", tooltip: "A label.", defaultValue: "Default Value");}