blueprint
Create and edit Blueprint classes: variables, functions, events, components, compile, and decompile.
What it’s for
This namespace is where your assistant authors Blueprint classes. It creates new Blueprint assets, adds and renames member variables, declares functions, events, and event dispatchers, manages the class-level component tree, sets class-default values, reparents, and runs the compiler. It is the main surface for building and reshaping the Blueprints your game is made of.
The most powerful tool here is the text IR. Rather than placing and wiring nodes one at a time, the assistant writes graph logic as a compact, reviewable text (BPIR) and compiles it in a single call. It can also go the other direction and decompile an existing graph back to text, so it can read what a Blueprint already does before it changes anything.
Reach for this namespace for class-level work. For editing a single placed actor in a level, use
actor instead, since class-default edits here do not retroactively change instances already
in the world. For fine-grained surgery on one existing graph, such as deleting a stray node or
reconnecting a single pin, drop down to blueprint.graph; the text IR is the bulk-authoring
path, and blueprint.graph is the editing path.
Examples
Scaffold a new component Blueprint
The assistant creates the asset, adds a variable, and declares an event, then compiles.
You: Create a BP_HealthComponent with a Health float and a TakeDamage event.
call("blueprint.create", {name:"BP_HealthComponent", savePath:"/Game/Components",
parentClass:"ActorComponent"})
→ {ok:true, path:"/Game/Components/BP_HealthComponent"}
call("blueprint.add_variable", {path:"/Game/Components/BP_HealthComponent",
variableName:"Health", variableType:"float", defaultValue:"100"})
→ {ok:true, changed:true}
call("blueprint.add_event", {path:"/Game/Components/BP_HealthComponent",
eventType:"custom", customEventName:"TakeDamage", x:0, y:0})
→ {ok:true}
call("blueprint.compile", {path:"/Game/Components/BP_HealthComponent"})
→ {ok:true, errors:0, warnings:0}
Done. BP_HealthComponent created with a Health variable and a TakeDamage event.
Author graph logic from text
The assistant reads the existing graph as text, then compiles a new event body in one call.
You: In BP_Door, add an OnInteract event that plays Open and disables collision.
call("blueprint.decompile", {assetPath:"/Game/BP_Door"})
→ {bpir:"event BeginPlay() { ... }"}
call("blueprint.compile_bpir", {assetPath:"/Game/BP_Door",
code:"event OnInteract() { PlayAnim('Open'); SetActorEnableCollision(false) }"})
→ {ok:true, compiled:true}
Done. OnInteract added: plays Open and disables collision.
Add a component to the class
The assistant adds a mesh component template that every spawned instance will inherit.
You: Give BP_Pickup a static mesh component using the coin mesh.
call("blueprint.scs.add_component", {blueprintPath:"/Game/BP_Pickup",
componentClass:"StaticMeshComponent", componentName:"CoinMesh",
meshPath:"/Game/Meshes/SM_Coin"})
→ {ok:true, added:"CoinMesh"}
call("blueprint.compile", {path:"/Game/BP_Pickup"})
→ {ok:true, errors:0}
Done. CoinMesh added to BP_Pickup and assigned the coin mesh.