Node Attributes

You can decorate your node class with custom node attributes.

NodeAttributes

Default node attributes, must be defined for every node class

[NodeAttributes("Title", "Category/SubCategory", "Description", new string["Output1", "ouput2"], NodeAttributes.NodeType.Action]

NodeRequiredComponent

Defines a component which is required for this node to work. The required component will then be displayed in the Graph editor. When enabled, the required component will then be added automatically to the FlowReactor component game object when assigning the graph.

[NodeRequiredComponent(typeof(Rigidbody)]

NodeColor

Set a custom color for the node. Set a hex color code (#FFFFFF) or a color ID defined in the FlowReactor settings.

[NodeColor("#FFFFFF")]

NodeIcon

Set an icon for the node. Can be either an icon name from FlowReactor / Core / Res / {Theme} / Icons. Or can be defined with a custom path like.

// Icon from FlowReactor Icon folder
[NodeIcon("startIcon")]
// Icon from custom path
[NodeIcon("Assets/MyNodes/Icons/icon.png")]

NodeHideOutput

By default, every node has one output. You can hide this output by using this attribute

[NodeHideOutput]

NodeHideInput

Hide the input on a node (like event nodes)

[NodeHideInput]

NodeSearchKeywords

Add additonal keywords which can be used for searching this node when creating it.

[NodeSearchKeywords("AI", "Movement")]

NodeSize

Define the default node size

[NodeSize(200, 100)]

NodeShowDefaultInspector

By default the node inspector does not show the default Unity inspector values. If you want to show other values then FRVariables please use this attribute.

[NodeShowDefaultInspector]

Last updated