OnDefineOptions(IOptionDefinitionContext)
Called during Node.DefineNode to define the options available on the node.
阅读时间1 分钟最后更新于 1 个月前
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");}