- Add MCP server with real Unreal Remote Execution Protocol (UDP 6766 + TCP 6776) - Implement 12 MCP tools: project intelligence, scene manipulation, debug/profiling, blueprint ops - Add enhanced .uasset parser with UE4/UE5 support - Create /blueprint-workflow skill (analyze, bp-to-cpp, cpp-to-bp, transform, optimize) - Include 21 passing tests - Add complete user documentation Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
5.6 KiB
Blueprint Workflow Skill
You are executing a Blueprint workflow command for Unreal Engine. This skill helps with analyzing, converting, and transforming Blueprints.
Command: {{command}}
Arguments: {{args}}
Instructions by Command
If command is analyze
-
Use
read_blueprinttool to parse the Blueprint -
Use
profile_blueprinttool if editor is connected -
Analyze for common issues:
- Heavy Event Tick usage (operations per frame)
- Blueprint casts (expensive operations)
- Tick-dependent logic that could be event-driven
- Large Blueprint graphs that should be split
- Missing async loading for assets
- Component lookups that should be cached
-
Report findings in this format:
## Performance Analysis: <Blueprint Name>
### Issues Found
🔴 HIGH: <issue description>
→ Suggestion: <fix>
🟡 MEDIUM: <issue description>
→ Suggestion: <fix>
🟢 LOW: <issue description>
→ Suggestion: <fix>
### Metrics
- Estimated Tick Cost: <X> operations/frame
- Complexity Score: <LOW/MEDIUM/HIGH>
- Optimization Potential: <percentage>%
### Recommendations
1. <recommendation>
2. <recommendation>
If command is bp-to-cpp
-
Use
read_blueprinttool to parse the Blueprint structure -
Extract:
- Variables (types, defaults, replication)
- Functions (parameters, return types)
- Events (delegates, dispatchers)
- Components
-
Generate C++ code following Epic standards:
- Proper UCLASS, UPROPERTY, UFUNCTION macros
- Blueprint-friendly specifiers (BlueprintCallable, BlueprintReadWrite)
- Network replication if needed (Replicated, ReplicatedUsing)
- Categories for organization
-
Output format:
// <ClassName>.h
#pragma once
#include "CoreMinimal.h"
#include "<ParentClass>.h"
#include "<ClassName>.generated.h"
UCLASS(Blueprintable)
class MYPROJECT_API <AClassName> : public <AParentClass>
{
GENERATED_BODY()
public:
<AClassName>();
// Properties
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "...")
<Type> <PropertyName>;
// Functions
UFUNCTION(BlueprintCallable, Category = "...")
<ReturnType> <FunctionName>(<Params>);
protected:
virtual void BeginPlay() override;
};
// <ClassName>.cpp
#include "<ClassName>.h"
<AClassName>::<AClassName>()
{
// Set defaults
}
void <AClassName>::BeginPlay()
{
Super::BeginPlay();
}
<ReturnType> <AClassName>::<FunctionName>(<Params>)
{
// Implementation
}
- Note any Blueprint-specific logic that cannot be directly converted
If command is cpp-to-bp
-
Use
scan_cpp_classesto find the C++ class -
Extract exposed properties and functions (UPROPERTY, UFUNCTION with Blueprint specifiers)
-
Use
create_blueprint_from_cpptool to create the Blueprint -
If editor not connected, generate a Python script:
import unreal
# Create Blueprint from <CppClass>
factory = unreal.BlueprintFactory()
factory.set_editor_property('parent_class', unreal.find_class('<CppClass>'))
asset_tools = unreal.AssetToolsHelpers.get_asset_tools()
blueprint = asset_tools.create_asset(
'<BlueprintName>',
'<OutputPath>',
unreal.Blueprint,
factory
)
if blueprint:
unreal.EditorAssetLibrary.save_asset('<OutputPath>/<BlueprintName>')
unreal.log('Created: <OutputPath>/<BlueprintName>')
- Report what was created:
## Blueprint Created: <BlueprintName>
### Parent Class
<CppClass>
### Exposed Properties (tweakable in Blueprint)
- <PropertyName>: <Type> = <Default>
- ...
### Callable Functions
- <FunctionName>(<Params>) → <ReturnType>
- ...
### Events
- <EventName>
- ...
### Location
<OutputPath>/<BlueprintName>
If command is transform
-
Use
read_blueprintto get current Blueprint structure -
Understand the modification request: "{{args}}"
-
Design the changes needed:
- New variables
- New functions
- Modified logic
- New components
-
Generate the transformation:
- If simple: Generate Python script to modify Blueprint
- If complex: Generate new C++ base class + new Blueprint
-
Report the transformation:
## Blueprint Transformation: <BlueprintName>
### Requested Change
"<modification_description>"
### Changes Made
1. Added variable: <name> (<type>)
2. Added function: <name>()
3. Modified: <what was changed>
### New Features
- <feature description>
### Generated Files
- <file1>
- <file2>
### Next Steps
1. <what user needs to do>
If command is optimize
-
First run
analyzeworkflow internally -
Identify optimization opportunities:
- Event Tick → Events + Timers
- Blueprint casts → Interfaces
- Heavy logic → C++ conversion candidates
- Repeated operations → Caching
-
For each HIGH impact issue:
- Generate optimized C++ code
- Or generate Python script to refactor Blueprint
-
Report:
## Optimization Report: <BlueprintName>
### Before
- Tick Cost: <X> ops/frame
- Complexity: <SCORE>
### After (Estimated)
- Tick Cost: <Y> ops/frame
- Complexity: <SCORE>
- **Performance Gain: +<Z>%**
### Optimizations Applied
1. <optimization description>
- Before: <what it was>
- After: <what it became>
- Gain: +<X>%
### Generated Files
- <file1> - <description>
- <file2> - <description>
### Manual Steps Required
1. <step>
2. <step>
Important Notes
- Always use MCP tools when available (
read_blueprint,create_blueprint_from_cpp, etc.) - If editor not connected, generate scripts for manual execution
- Follow Epic Coding Standards for all C++ code
- Preserve Blueprint functionality when converting
- Add comments explaining complex conversions
- Warn about any functionality that cannot be preserved