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

Descriptor Creation Wizard

The Descriptor Creation Wizard is a Unity Editor window included with Community Addons that helps you create custom Unit Descriptors for Visual Scripting.
Descriptors control your units info in the graph, including their titles, subtitles, summaries, icons, and port labels.

This tool removes the need to hand-write descriptor classes, by letting you configure them in the editor and then automatically generating a C# script.


Opening the Wizard

You can open the wizard from the Unity menu:

Window β†’ Community Addons β†’ Descriptor Creation Wizard

This opens a dockable editor window.


Main Options

  • Unit Type
    The unit you want to create a descriptor for. Only classes that inherit from Unit are valid.

  • Generate Button
    When you finish customizing, click Generate. You will be asked to choose a save location (the file must be inside a folder named Editor).
    The tool will generate a descriptor script for your unit.


Customization States

Descriptors can define different text and icons for three possible states:

  1. Defined State – when the unit is valid and fully set up.
  2. Default State – the fallback look when no customization is applied.
  3. Error State – when the unit has errors or exceptions.

Each state supports:

  • Title – the main display name.
  • Short Title – an abbreviated version of the name.
  • Surtitle – text above the main title.
  • Subtitle – text below the main title.
  • Summary – description shown in the fuzzy finder or inspector.
  • Custom Icon – optional, assign a Texture2D to be used as the unit’s icon.

Port Customization

You can also customize port labels and summaries.

  • Enable Customize Ports to see all fields and properties in the unit that represent ports (IUnitPort).

Note: This will not find ports that are dynamically added it can only find fields or properties that are explicitly made for the port.

  • For each port, you can set:
    • Port Label – the display name of the port.
    • Port Description – the summary of the port.

This is useful for making your nodes clearer and easier to understand.


Generating the Descriptor

When you are done:

  1. Press Generate.
  2. Choose a save location. The filename will be auto-suggested based on your unit type.
  3. A descriptor C# class will be generated, including:
    • Overrides for titles, subtitles, summaries, and icons.
    • Optional overrides for error handling (using exception messages).
    • Custom port labeling and summaries if enabled.

Unity will then recompile, and your new descriptor will automatically take effect in Visual Scripting.


Example Workflow

  1. Open Descriptor Creation Wizard.
  2. Select your custom unit type (e.g. MyCustomNode).
  3. In Customize Defined State, set:
    • Title: My Custom Node
    • Subtitle: Special
    • Summary: Performs a special action
    • Icon: assign a texture.
  4. Enable Customize Ports and rename one input port label to Input Value.
  5. Click Generate, save the file under an Editor folder.

Result: Your node now shows the custom title, subtitle, icon, and port labels inside the Visual Scripting graph.


Tips

  • Place generated descriptors in an Editor folder to ensure Visual Scripting recognizes them correctly.
  • Use Error State text with placeholders like {message} or {stacktrace} to automatically show exception details.