Databrain Documentation
databrain.ccDiscord
  • Welcome
  • Installation / Update
  • Interface
  • DataObject Property Drawer
    • No GUI Implemented - FIX
  • Getting started
  • Guides
    • Add data objects
    • Add data objects at runtime
    • Get initial data
    • Get/Set runtime data
    • Serialize DataObjects
    • Runtime Save & Load
    • Use custom serializer
    • Import
    • Search
    • Custom GUI
    • Custom GUI with Odin Inspector
    • Hierarchy Template
  • Separate DataObjects
  • Using Version Control
  • Attributes
    • DataObject attributes
    • Field attributes
  • API
    • DataLibrary
    • DataObject
  • FAQ
    • Databrain - FAQ
  • Add-ons
    • Events
    • Blackboard
    • Logic
      • Interface
      • Create Graph
      • Execute graph
      • Control flow execution in groups
      • Custom Nodes
        • Asynchronous execution
        • Node Attributes
      • Scene Components
      • Graph Events
      • Finite State Machine
        • Create custom Actions
        • Examples
        • State Machine Nodes
    • Stats
      • Achievements
      • Modifiers
      • Values
      • Progressions
      • Components
      • Nodes
    • Progress
      • Progress Settings
      • Progress Graph
      • Progress Resources
      • Runtime UI Setup
      • API
        • ProgressController
    • Techtree (LEGACY)
      • Techtree Manager
      • Techtree
      • TechtreeResource
      • Techtree UIBuilder
        • Custom Techtree Node Button
        • Tooltip
      • API
    • Localization
      • Localization Manager
      • Localization
      • Examples
      • Components
      • Import
      • API
    • Inventory
      • Getting started
      • Demo
      • Data setup
        • Inventories
        • Slot IDs
        • Items
          • Blueprints
          • Item rarities
        • Money
        • Loot tables
        • Events
      • Runtime UI
        • Setup
    • Dialogue
      • Getting Started
        • Demo
      • Dialogue runtime setup
      • Actors
        • Emotions
      • Localization
      • Audio
      • Animation
      • Variables
      • Custom theme
      • Import
      • Nodes
      • API
        • DialogueController
        • IDialogueUIControl
  • Changelog
    • Databrain - Changelog
      • 1.4.0
      • 1.3.2
      • 1.3.1
      • 1.3.0
      • 1.2.0
      • 1.1.0
      • 1.0.10
      • 1.0.9
      • 1.0.8
      • 1.0.7
      • <= 1.0.6
Powered by GitBook
On this page
  • NodeTitle
  • NodeCategory
  • NodeIcon
  • NodeColor
  • NodeDescription
  • NodeOutputs
  • NodeSize
  • NodeNotConnectable
  • NodeAddOutputsUI
  • HideNode
  • NodeInputConnectionType
  • NodeOutputConnectionType
  • Node3LinesSpline
  1. Add-ons
  2. Logic
  3. Custom Nodes

Node Attributes

You can add mutliple attributes to your node class to define the node properties

[NodeTitle("My Node")]
[NodeCategory("Custom")]
[NodeOutputs(new string[] {"Out"})]
[NodeDescription("This is a node description")]
public class MyNode : NodeData

NodeTitle

[NodeTitle("My Node")]

Define the title of your node

NodeCategory

[NodeCategory("Category A/Sub-Category")]

Set the category of your node

You can also define sub-categories with a backslash. (example: Unity/Physics)

NodeIcon

Set an icon for your node, either by assigning the name of an icon from the icons folder located at Databrain / Core / Res / Icons or by assigning a complete asset path like: Assets/MyNodes/Icons/nodeIcon.png or by assigning an additional file name which is located in the same folder as the icon.

[NodeIcon("start")]
[NodeIcon("myCustomIcon.png", "CustomIcons.cs")]

NodeColor

Define the color of your node. Either by a hex color string or by a DatabrainColor.

[NodeColor("#76FFAE")]

You can also define custom colors for each border (left, right, top, bottom)

[NodeColor("#76FFAE", new string[]{"", "#FFFFFF", "", ""})]

NodeDescription

[NodeDescription("This is a description for my node")]

Set a description for your node

NodeOutputs

[NodeOutputs(new string[] {"A", "B", "C"})}

Define the node outputs.

NodeSize

[NodeSize(200, 100)]

Set the node size

NodeNotConnectable

[NodeNotConnectable]

This attribute makes the node not connectable like the OnStart node.

NodeAddOutputsUI

[NodeAddOutputsUI]

This will add a simple UI to the node inspector which allows you to manually add and remove outputs.

HideNode

[HideNode]

Hide the node from the node creation panel

NodeInputConnectionType

[NodeInputConnectionType(new Type[]{typeof(CustomNodeType)}]

Define which nodes are allowed to be connected to the input of the node.

NodeOutputConnectionType

[NodeOutputConnectionType(new Type[] {typeof(CustomNodeType)}]

Define to which node types the output can be connected to.

Node3LinesSpline

[Node3LinesSpline]

Creates a three lines connection spline type instead of just one single spline.

PreviousAsynchronous executionNextScene Components

Last updated 1 year ago