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");}