Unreal Blueprint Codegen logo

Unreal Blueprint Codegen

Community
maystudios
unreal-blueprint-codegen

Programmatically generate Unreal Engine 5.x Blueprint and Widget Blueprint .uasset files from C++. Use when building a content generator for Fab/Marketplace samples, Quick-Start kits, tutorial assets, or editor utilities that mass-produce Blueprints, Widget Blueprints with UMG animations, or domain assets (dialogue, quest, ability data). Covers UBlueprint creation with full event-graph authoring (UK2Node_*, FBlueprintEditorUtils), UWidgetBlueprint hierarchies, UWidgetAnimation with MovieScene tracks and keyframes, two-pass compile, and the K2Node spawn idiom. Triggers on "create a Blueprint generator", "generate WBP from C++", "programmatically author event graph", "build dialogue/quest assets from code", "editor utility to generate marketplace samples", or any task involving FKismetEditorUtilities::CreateBlueprint, UWidgetBlueprintFactory, FBlueprintEditorUtils::AddMemberVariable, or UMovieScene2DTransformTrack.

Overview

Publishermaystudios
Repositoryclaude-skills
Skill nameunreal-blueprint-codegen
Stars
26
Forks
2
Bundled files
10
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 10 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by maystudios on GitHub. Read the source before you install it.

Installation

Install the Unreal Blueprint Codegen AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/maystudios/claude-skills/tree/main/unreal-blueprint-codegen
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/maystudios/claude-skills.git /tmp/claude-skills
mkdir -p .claude/skills
cp -r /tmp/claude-skills/unreal-blueprint-codegen .claude/skills/unreal-blueprint-codegen
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Unreal Blueprint Codegen in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Unreal Blueprint Codegen on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Unreal Blueprint Codegen is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Unreal Engine Blueprint Code Generation (UE 5.4–5.7)

Generate complete .uasset files (Blueprints, Widget Blueprints, domain assets) from C++ in an editor module. Validated against UE 5.7. Most patterns work back to 5.4.

When this skill applies

User wants to author asset content programmatically — variables, function graphs, event-graph wiring, widget hierarchies, UMG animations, custom asset graphs — instead of clicking through the editor. Typical use case: generating Marketplace sample content (Quick-Start, walkthrough, demo conversations) so it can be regenerated reproducibly instead of hand-pruning binary .uasset files.

If the user only wants runtime widget instantiation (CreateWidget / WidgetTree->ConstructWidget at game time), this skill is overkill — that's just normal UMG.

Hard prerequisites

  • C++ editor module with Type=Editor (or UncookedOnly). Python cannot author event graphs — UEdGraph/UK2Node_* are not exposed. Set up a UBlueprintFunctionLibrary in C++ and call its UFUNCTIONs from Python if a Python entry point is needed.
  • Module must depend on at least: UnrealEd, BlueprintGraph, Kismet, KismetCompiler, AssetTools, AssetRegistry. Add UMG, UMGEditor, MovieScene, MovieSceneTracks for Widget Blueprints. See assets/experiment-module-template/ for a working .Build.cs.
  • IWYU: include each engine header explicitly. Forward-declare UPackage/UObject etc. in your own headers; pull full headers in .cpp only.

The 30-second mental model

Asset = UPackage  +  UObject (e.g. UBlueprint / UWidgetBlueprint / UMyAsset)
                     |
                     +-- source UEdGraph (editor-only, what designers see)
                     |     +-- UK2Node_* / UEdGraphNode_* (the boxes)
                     |           +-- UEdGraphPin (the wires)
                     |
                     +-- generated UClass  <- produced by CompileBlueprint
                           +-- FProperty / UFunction (what code uses at runtime)

Spawn editor nodes onto a graph, wire their pins, then call CompileBlueprint to bake the generated class. Save the package.

Decision tree

GoalRead
Add variables, functions, custom events, math nodes to a regular Blueprintreferences/k2node-cookbook.md
Build a Widget Blueprint with widget hierarchyreferences/widget-blueprint-cookbook.md
Add UMG animations (UWidgetAnimation + MovieScene tracks/keyframes) from C++references/widget-blueprint-cookbook.md
The compiler says "function not found", FindPinChecked asserts, or a node has no pinsreferences/two-pass-compile.md — read before debugging
Need a working module skeleton to start fromassets/experiment-module-template/
Hit a weird Engine API quirk or version-specific issuereferences/caveats.md

Standard workflow

For every generator function:

  1. Create / load package: CreatePackage(*FullPath) then Package->FullyLoad().
  2. Create the asset with FKismetEditorUtilities::CreateBlueprint(...) (covers both UBlueprint and UWidgetBlueprint — pass the right Blueprint class + GeneratedClass).
  3. Build content — variables, function graphs, widget tree, animations.
  4. Wire event graph / call user functions — only AFTER an intermediate compile if the wiring references content created in step 3 (see two-pass-compile.md).
  5. MarkBlueprintAsStructurallyModified + CompileBlueprint — once at the end (or twice, two-pass).
  6. Save: FAssetRegistryModule::AssetCreated(Asset) + Package->MarkPackageDirty() + UPackage::SavePackage(...).

Skeleton:

cpp
#include "Engine/Blueprint.h"
#include "Kismet2/BlueprintEditorUtils.h"
#include "Kismet2/KismetEditorUtilities.h"
#include "AssetRegistry/AssetRegistryModule.h"
#include "UObject/SavePackage.h"

UBlueprint* CreateBP(const FString& PackagePath, const FString& AssetName, UClass* ParentClass)
{
    const FString FullPath = PackagePath / AssetName;
    UPackage* Package = CreatePackage(*FullPath);
    Package->FullyLoad();

    UBlueprint* BP = FKismetEditorUtilities::CreateBlueprint(
        ParentClass,                  // e.g. AActor::StaticClass() or UUserWidget::StaticClass()
        Package,
        FName(*AssetName),
        BPTYPE_Normal,
        UBlueprint::StaticClass(),    // or UWidgetBlueprint::StaticClass()
        UBlueprintGeneratedClass::StaticClass(),  // or UWidgetBlueprintGeneratedClass::StaticClass()
        FName("MyGenerator"));        // calling-context tag; any FName

    // ... build content here ...

    FBlueprintEditorUtils::MarkBlueprintAsStructurallyModified(BP);
    FKismetEditorUtilities::CompileBlueprint(BP);

    FAssetRegistryModule::AssetCreated(BP);
    Package->MarkPackageDirty();
    const FString Filename = FPackageName::LongPackageNameToFilename(
        Package->GetName(), FPackageName::GetAssetPackageExtension());
    FSavePackageArgs Args;
    Args.TopLevelFlags = RF_Public | RF_Standalone;
    UPackage::SavePackage(Package, BP, *Filename, Args);

    return BP;
}

Critical rules (read these even if skipping cookbooks)

1. SetExternalMember BEFORE AllocateDefaultPins on UK2Node_CallFunction

cpp
UK2Node_CallFunction* Node = NewObject<UK2Node_CallFunction>(Graph);
Node->FunctionReference.SetExternalMember(
    GET_FUNCTION_NAME_CHECKED(UKismetSystemLibrary, PrintString),
    UKismetSystemLibrary::StaticClass());
Node->AllocateDefaultPins();   // AFTER. Reverse and the node spawns pinless.

Same rule for UK2Node_VariableSet/Get: set the variable reference first, then AllocateDefaultPins.

2. MarkBlueprintAsStructurallyModified vs Modified

  • StructurallyModified: any node added/removed, any variable added/removed, any pin topology change. Forces class layout regen.
  • Modified: only property tweaks on existing nodes/vars (e.g. changed a default value).

For codegen, almost always use MarkBlueprintAsStructurallyModified.

3. Function calls must be in the exec chain or get pruned

Non-pure functions (with exec pins) must be wired into the exec chain. If you connect their data output without wiring exec, the BP compiler prunes the call and the data pin reads default. Symptom: warning "X was pruned because its Exec pin is not connected".

cpp
// WRONG — Compute is non-pure, exec not wired, gets pruned:
EvtThen->MakeLinkTo(SetCounter->GetExecPin());
ComputeRet->MakeLinkTo(CounterValPin);  // reads default, not actual return

// RIGHT — Compute in the chain:
EvtThen->MakeLinkTo(CallCompute->GetExecPin());
CallCompute->GetThenPin()->MakeLinkTo(SetCounter->GetExecPin());
ComputeRet->MakeLinkTo(CounterValPin);

4. Avoid (0,0) — auto-spawned default events live there

Both AActor-based BPs and Widget Blueprints auto-spawn placeholder events (BeginPlay, Tick, ActorBeginOverlap, PreConstruct, Construct) at (0, 0). Position your nodes well off, e.g. Y=-300, X=-400. Otherwise the user opens the asset to a tangled mess.

5. Two-pass compile when nodes reference newly-created content

If you create a function Compute and then wire CallCompute referencing it in the same pass, AllocateDefaultPins on CallCompute runs before Compute is reflected on the generated class — the pins for InValue/ReturnValue won't exist, and FindPinChecked asserts. Fix: compile after building the function, then wire the call. Same for UMG animations referenced via UK2Node_VariableGet. See references/two-pass-compile.md.

Common UE 5.7 gotchas (full list in caveats.md)

  • PlayAnimationByName does NOT exist on UUserWidget in 5.7. Only PlayAnimation(UWidgetAnimation*, ...). Wire via UK2Node_VariableGet for the animation, not a string.
  • Animation FName must equal display label. UUserWidget::GetAnimationByName matches GetFName(). Set both: NewObject<UWidgetAnimation>(WBP, FName("SlideIn"), ...) plus Anim->SetDisplayLabel(TEXT("SlideIn")).
  • Outer hierarchy is load-bearing. UWidgetAnimation's outer must be the WBP. UMovieScene's outer must be the animation. Wrong outer → animation does not appear in the editor's Animations panel.
  • UE_DEFINE_GAMEPLAY_TAG_STATIC for any tags the generated assets reference. Runtime UGameplayTagsManager::AddNativeGameplayTag from inside a generator function is too late — the editor UI's tag tree is already built. Register at module load.
  • Python cannot reach UEdGraph / UK2Node_*. The only way to author event graphs is C++. Expose your generator as BlueprintCallable UFUNCTIONs on a UBlueprintFunctionLibrary if Python invocation is desired.
  • FBlueprintEditorUtils::AddFunctionGraph does NOT spawn a Result node by default. Only Entry. If your function returns a value, manually create one with FGraphNodeCreator<UK2Node_FunctionResult>.

Quick FEdGraphPinType cheat sheet

cpp
FEdGraphPinType T;
T.PinCategory = UEdGraphSchema_K2::PC_Boolean;            // bool
T.PinCategory = UEdGraphSchema_K2::PC_Int;                // int32
T.PinCategory = UEdGraphSchema_K2::PC_Real;
T.PinSubCategory = UEdGraphSchema_K2::PC_Float;           // float
T.PinSubCategory = UEdGraphSchema_K2::PC_Double;          // double
T.PinCategory = UEdGraphSchema_K2::PC_String;             // FString
T.PinCategory = UEdGraphSchema_K2::PC_Name;               // FName
T.PinCategory = UEdGraphSchema_K2::PC_Text;               // FText
T.PinCategory = UEdGraphSchema_K2::PC_Object;             // object ref
T.PinSubCategoryObject = AActor::StaticClass();           //   (with target class)
T.ContainerType = EPinContainerType::Array;               // wrap as TArray<>
T.ContainerType = EPinContainerType::Set;                 // TSet<>
T.ContainerType = EPinContainerType::Map;                 // TMap<>  (PinValueType for value)

Use with: FBlueprintEditorUtils::AddMemberVariable(BP, FName("MyVar"), T, FString(TEXT("DefaultValueAsString")));

Workflow checklist

When implementing a generator from this skill:

  1. Confirm the editor module exists with the right dependencies (template in assets/experiment-module-template/).
  2. Read references/k2node-cookbook.md for the patterns relevant to the asset type.
  3. For Widget Blueprints, also read references/widget-blueprint-cookbook.md.
  4. If wiring crosses content created in the same function, plan the two-pass compile structure (references/two-pass-compile.md).
  5. Check references/caveats.md for known traps before assuming new behavior is a bug.
  6. Test by building the editor target, opening the editor, calling the UFUNCTION (often via Python in the Output Log), and visually inspecting the asset.
  7. Iterate: when a node looks wrong (red error border, missing pin, "X pruned" warning, default values where data should flow), the answer is almost always one of: missing exec wire, wrong allocation order, missing two-pass compile, or wrong pin name.

What this skill does NOT cover

  • Cooking / packaging the generated assets — they are regular .uasset files, ship like any other.
  • Editor Utility Widgets / Blutilities — you can call your generator UFUNCTIONs from those, but designing the EUW is separate UMG work.
  • Runtime UMG — CreateWidget, AddToViewport, animation PlayAnimation calls in game code. That is not codegen.
  • Custom UEdGraph schemas — if generating into a domain-specific graph (dialogue, quest, ability tree), use the plugin's own compiler entry point. Static compiler classes are often non-exported, so call the graph's update method (e.g. UMyGraph::UpdateAsset()) instead of the static compiler if linkage fails.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Unreal Blueprint Codegen AI skill do?

Programmatically generate Unreal Engine 5.x Blueprint and Widget Blueprint .uasset files from C++. Use when building a content generator for Fab/Marketplace samples, Quick-Start kits, tutorial assets, or editor utilities that mass-produce Blueprints, Widget Blueprints with UMG animations, or domain assets (dialogue, quest, ability data). Covers UBlueprint creation with full event-graph authoring (UK2Node_*, FBlueprintEditorUtils), UWidgetBlueprint hierarchies, UWidgetAnimation with MovieScene tracks and keyframes, two-pass compile, and the K2Node spawn idiom. Triggers on "create a Blueprint...

Why use Unreal Blueprint Codegen on TypingMind?

Because you install it once and use it with any model. Unreal Blueprint Codegen is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Unreal Blueprint Codegen in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/maystudios/claude-skills/tree/main/unreal-blueprint-codegen. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Unreal Blueprint Codegen?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Unreal Blueprint Codegen?

As many as you like. As long as a model supports skills, you can use Unreal Blueprint Codegen with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Unreal Blueprint Codegen AI skill free?

Yes. It is published on GitHub by maystudios under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇