Node Creation Wizard - RealityStop/Bolt.Addons.Community GitHub Wiki

Node Creation Wizard

The Node Creation Wizard is a Unity Editor window included with Community Addons that helps you quickly create custom Visual Scripting nodes without writing all the boilerplate code by hand.
It lets you define ports, types, and logic structure, and then generates a C# script that can be compiled into a new unit. You will still have to add the logic for your unit manually in the script.


Opening the Wizard

You can open the wizard from the Unity menu:

Window → Community Addons → Node Creation Wizard

This opens a dockable editor window.


Main Options

  • File Name
    The name of the generated C# script and the class. Spaces will be removed automatically.

  • Category
    The Visual Scripting category where the node will appear in the fuzzy finder (e.g. Community/MyNodes).

  • Open Generated File
    If enabled, the generated script will be opened in your default code editor after creation.

  • Base Type
    Select which unit type your custom node will inherit from. You can click the type selector button to choose from available Unit types.


Ports

The wizard lets you add and configure Control and Value ports.

Control Inputs

  • Trigger execution into your node.
  • You can define a Name, an optional Method Name, and whether the port label should be hidden.
  • Each control input automatically generates a method you can fill in with custom logic.

Control Outputs

  • Trigger execution out of your node.
  • You can define a Name and choose to hide its label.

Value Inputs

  • Define incoming values to the node.
  • Options include:
    • Name
    • Type (choose from the type selector)
    • Hide Label
    • Null Means Self (useful for component references)

Value Outputs

  • Define values your node outputs.
  • Options include:
    • Name
    • Type (choose from the type selector)
    • Hide Label
    • Triggers Method (if enabled, a method stub will be generated to compute the value)

Generating the Node

When you’re ready, click Create.

  1. You’ll be asked where to save the .cs file.

  2. The wizard will generate a full C# template for your node, including:

    • Port fields (ControlInput, ControlOutput, ValueInput, ValueOutput)
    • A Definition() method that wires up the ports
    • Methods for control inputs and value outputs that require logic
  3. Unity will recompile, and the node will be available in Visual Scripting.


Example Workflow

  1. Open Node Creation Wizard.
  2. Set File Name to MyCustomNode.
  3. Set Category to Community/Examples.
  4. Add:
    • One Control Input (method: Enter)
    • One Control Output
    • One Value Input (float)
    • One Value Output (float, triggers method: GetResult)
  5. Click Create and save.

Generated class (simplified):

[UnitCategory("Community/Examples")]
[UnitTitle("MyCustomNode")]
public class MyCustomNode : Unit
{
    [DoNotSerialize] public ControlInput Enter;
    [DoNotSerialize] public ControlOutput Exit;
    [DoNotSerialize] public ValueInput input;
    [DoNotSerialize] public ValueOutput result;

    protected override void Definition()
    {
        Enter = ControlInput(nameof(Enter), OnEnter);
        Exit = ControlOutput(nameof(Exit));
        input = ValueInput<float>(nameof(input), 0);
        result = ValueOutput<float>(nameof(result), GetResult);
        Succession(Enter, Exit);
    }

    public ControlOutput OnEnter(Flow flow)
    {
        // Custom logic
        return Exit;
    }

    public float GetResult(Flow flow)
    {
        return flow.GetValue<float>(input) * 2f;
    }
}
⚠️ **GitHub.com Fallback** ⚠️