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

IOptionBuilder

interface 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

Interface used to build and configure node options in a fluent manner.

Provided by the Node.IOptionDefinitionContext in a node's Node.OnDefineOptions method.

 protected override void OnDefineOptions(IOptionDefinitionContext context)
 {
     context.AddOption("MyOption", typeof(int)))
         .WithDefaultValue(2)
         .Delayed();
 }

Public Methods

Method Description
Build Builds and returns the final INodeOption instance based on the current configuration of the builder.
Delayed Configures the input port to use the UnityEngine.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.