Skip to main content
Node to Code converts Blueprint graphs into a compact JSON format called N2CStruct before sending them to an LLM. This schema reduces token usage by 60–90% compared to Unreal Engine’s verbose Blueprint text format, keeping translation fast and cost-effective.

Top-level structure

{
  "version": "1.0.0",
  "metadata": {
    "Name": "MyCharacter",
    "BlueprintType": "Normal",
    "BlueprintClass": "AMyCharacter"
  },
  "graphs": [ ... ],
  "structs": [ ... ],
  "enums": [ ... ]
}
version
string
Always "1.0.0" in the current spec.
metadata.Name
string
The Blueprint asset name.
metadata.BlueprintType
string
One of: Normal, Const, MacroLibrary, Interface, LevelScript, FunctionLibrary.
metadata.BlueprintClass
string
The parent class this Blueprint extends (e.g. ACharacter).
graphs
array
Array of graph objects — one per function, event graph, macro, etc.
structs
array
Blueprint-defined structs referenced by this Blueprint.
enums
array
Blueprint-defined enums referenced by this Blueprint.

Graph object

{
  "name": "ExecuteAttack",
  "graph_type": "Function",
  "nodes": [ ... ],
  "flows": {
    "execution": ["N1->N2->N3", "N3->N4"],
    "data": {
      "N2.P3": "N1.P2",
      "N4.P1": "N3.P4"
    }
  }
}
name
string
The graph name as shown in the Blueprint editor.
graph_type
string
One of: EventGraph, Function, Composite, Macro, Construction, Animation.
flows.execution
array of strings
Each string is a chain of node IDs connected by ->, e.g. "N1->N2->N3".
flows.data
object
Maps output pin references ("NodeID.PinID") to input pin references. Example: "N2.P3": "N1.P2" means N1’s output pin P2 feeds into N2’s input pin P3.

Node object

{
  "id": "N1",
  "type": "call_function",
  "name": "Print String",
  "member_parent": "KismetSystemLibrary",
  "member_name": "PrintString",
  "comment": "Optional node comment",
  "pure": false,
  "latent": false,
  "input_pins": [ ... ],
  "output_pins": [ ... ]
}
id
string
Short sequential ID, e.g. "N1", "N2". Used for flow references.
type
string
The node type string (e.g. call_function, branch, variable_get). See Supported Node Types.
member_parent
string
The class or library that owns the function/variable (e.g. KismetSystemLibrary, GameplayStatics).
member_name
string
The function or variable name being accessed.
pure
boolean
true for pure (const, no execution pin) functions.
latent
boolean
true for latent/async nodes (e.g. Delay, async task nodes).

Pin object

{
  "id": "P1",
  "name": "InString",
  "type": "String",
  "sub_type": "",
  "default_value": "Hello World",
  "connected": false,
  "is_reference": false,
  "is_const": false,
  "is_array": false,
  "is_map": false,
  "is_set": false
}
id
string
Short local ID scoped to the node, e.g. "P1".
type
string
The pin type. See the full list in Supported Node Types.
sub_type
string
Optional subtype for Object, Struct, Enum, Class, etc. (e.g. "ACharacter").
default_value
string
The pin’s default value when not connected.
connected
boolean
Whether this pin has an active connection in the graph.

Complete example

This is a minimal Blueprint with a single function that calls PrintString:
{
  "version": "1.0.0",
  "metadata": {
    "Name": "MyActor",
    "BlueprintType": "Normal",
    "BlueprintClass": "AActor"
  },
  "graphs": [
    {
      "name": "SayHello",
      "graph_type": "Function",
      "nodes": [
        {
          "id": "N1",
          "type": "function_entry",
          "name": "SayHello",
          "member_parent": "",
          "member_name": "SayHello",
          "comment": "",
          "pure": false,
          "latent": false,
          "input_pins": [],
          "output_pins": [
            { "id": "P1", "name": "then", "type": "Exec", "sub_type": "", "default_value": "", "connected": true, "is_reference": false, "is_const": false, "is_array": false, "is_map": false, "is_set": false }
          ]
        },
        {
          "id": "N2",
          "type": "call_function",
          "name": "Print String",
          "member_parent": "KismetSystemLibrary",
          "member_name": "PrintString",
          "comment": "",
          "pure": false,
          "latent": false,
          "input_pins": [
            { "id": "P1", "name": "Exec", "type": "Exec", "sub_type": "", "default_value": "", "connected": true, "is_reference": false, "is_const": false, "is_array": false, "is_map": false, "is_set": false },
            { "id": "P2", "name": "InString", "type": "String", "sub_type": "", "default_value": "Hello!", "connected": false, "is_reference": false, "is_const": false, "is_array": false, "is_map": false, "is_set": false }
          ],
          "output_pins": [
            { "id": "P3", "name": "then", "type": "Exec", "sub_type": "", "default_value": "", "connected": false, "is_reference": false, "is_const": false, "is_array": false, "is_map": false, "is_set": false }
          ]
        }
      ],
      "flows": {
        "execution": ["N1->N2"],
        "data": {}
      }
    }
  ],
  "structs": [],
  "enums": []
}
You can copy the raw N2C JSON for any Blueprint to your clipboard using the Copy JSON button in the Blueprint Editor toolbar. This is useful for debugging or sharing Blueprint logic as text.

Build docs developers (and LLMs) love