IOptionBuilder
Interface used to build and configure node options in a fluent manner.
Read time 1 minuteLast updated 6 days ago
Definition
- Type: Interface
- Namespace: Unity.GraphToolkit.Editor
- Assembly: UnityEditor
public interface IOptionBuilder
Remarks
Provided by the Node.IOptionDefinitionContext in a node's Node.OnDefineOptions method.
Examples
protected override void OnDefineOptions(IOptionDefinitionContext context){ context.AddOption("MyOption", typeof(int))) .WithDefaultValue(2) .Delayed();}
Methods
Method | Description |
|---|---|
| AsTextArea | Configures the option to use the TextAreaAttribute. |
| Build | Builds and returns the final INodeOption instance based on the current configuration of the builder. |
| Delayed | Configures the option to use the DelayedAttribute. |
| ShowInInspectorOnly | Configures the option to be shown only in the inspector, not in the node header. |
| WithDefaultValue | Configures the default value for the option being built. |
| WithDisplayName | Configures the display name of the option being built. |
| WithTooltip | Configures the tooltip text for the option being built. |