Unreal Engine
Overview
Use this skill to connect OpenClaw-style agent workflows to Unreal Engine 5.0+ in a way that survives engine minor-version differences. In the evaluated Unreal Engine source repo, built-in RemoteControl, HttpBlueprint, JsonBlueprintUtilities, PythonScriptPlugin, and WebSockets support are already present, so prefer composition over engine patching.
Prefer these integration paths:
- 1. Editor automation path: Use Unreal Remote Control for editor-time inspection and automation.
- Blueprint low-code path: Compose
HttpBlueprint + JsonBlueprintUtilities for Blueprint-driven request/response workflows. - Project/plugin path: Add a lightweight plugin that exposes OpenClaw-specific transport, auth, session, and task hooks to C++ and Blueprints.
Do not assume a single Unreal API surface works identically across all 5.x releases. Keep compile-time dependencies minimal and isolate version-sensitive code.
Integration strategy
1. Pick the right control plane first
Choose based on the task:
- - Blueprint inspection, editor object/property changes, calling exposed editor functions, preset-driven tooling
- Prefer
Unreal Remote Control.
- Best for editor-time orchestration without deeply embedding agent logic into gameplay code.
- - Blueprint-first HTTP/JSON workflows without much C++
- Prefer built-in
HttpBlueprint +
JsonBlueprintUtilities.
- Best for quick prototyping and designer-friendly task flows.
- - Editor automation where Python is a better fit than C++/Blueprint
- Prefer
PythonScriptPlugin.
- Best for content tooling, batch editor scripting, and rapid iteration.
- - Runtime communication from a packaged game or PIE session, Blueprint utility nodes, project-specific task execution, custom authentication/transport
- Prefer a
project plugin.
- - Both editor-time and runtime tasks
- Use both: Remote Control for editor-side work, built-in Blueprint/Python tooling where appropriate, and a plugin for runtime-safe OpenClaw-specific behavior.
2. Keep version compatibility broad
For UE 5.0+
- - Prefer engine modules with long-lived APIs:
Core, CoreUObject, Engine, HTTP, Json, JsonUtilities, WebSockets. - Wrap version-sensitive code behind helper functions or macros.
- Avoid depending on editor-only modules in runtime code.
- Split runtime/editor concerns into separate modules only if the task actually needs editor extensions.
3. Treat Blueprint support as a first-class requirement
When the user mentions Blueprints, do not stop at C++ plumbing. Provide:
- -
UBlueprintFunctionLibrary nodes for one-shot operations - Optional
UGameInstanceSubsystem or UEngineSubsystem for persistent connections/state - Delegate/event surfaces for async results
- Simple JSON-in/JSON-out fallback nodes when typed schemas are not settled yet
Default architecture
Use this mental model unless the project requires something else:
- Orchestrates tasks, optionally talks HTTP/WebSocket, can emit structured JSON task envelopes.
- Remote Control exposes editor-manageable objects/functions/properties.
- Provides Blueprint nodes and runtime transport.
- Receives task envelopes, dispatches to Blueprint/C++ handlers, returns structured results.
Task patterns
Pattern A: Editor-time Blueprint and asset tasks
Use when the goal is to:
- - inspect or tweak actors/components in the editor
- trigger exposed functions on editor utilities
- update properties on Remote Control presets
- support technical art / virtual production style workflows
Approach:
- 1. Ensure the project enables Unreal Remote Control.
- Expose only the objects/functions/properties needed.
- Have OpenClaw call the Remote Control HTTP/WebSocket API.
- Keep destructive/editor-mutating actions explicit and scoped.
Good fit:
- - level setup helpers
- virtual production controls
- editor utility actors/widgets
- batch property updates
Pattern B: Runtime or gameplay-adjacent tasks
Use when the goal is to:
- - connect a running client/editor session to OpenClaw
- send prompts/tasks/results over HTTP or WebSocket
- make tasks callable from Blueprints
- support packaged builds or PIE behavior
Approach:
- 1. Add a runtime plugin.
- Put transport in a subsystem or manager UObject.
- Expose simple Blueprint nodes.
- Return structured results and explicit errors.
Good fit:
- - AI-driven NPC tooling
- in-editor copilot panels backed by runtime-safe transport
- gameplay testing hooks
- diagnostics and telemetry bridges
Workflow
Follow this sequence.
Step 1: Identify the integration target
Determine:
- - engine version or version range
- editor-only vs runtime vs both
- whether Blueprints must be supported directly
- transport needs: HTTP, WebSocket, local CLI bridge, or mixed
- whether packaged builds matter
If the source repository is not accessible, say so clearly and proceed with a standards-based scaffold.
Step 2: Inspect the project structure
For an Unreal project, look for:
- - INLINECODE17
- INLINECODE18
- INLINECODE19
- existing module
.Build.cs files - any existing editor utility widgets, subsystems, or automation scripts
If you are generating a new plugin, prefer placing it under Plugins/<PluginName>/.
Step 3: Choose a plugin shape
Default to a single runtime module when possible.
Create extra modules only if needed:
- - Runtime module for packaged/runtime-safe features
- Editor module only for details panels, menus, custom tabs, or editor-only APIs
Step 4: Expose Blueprint surfaces
Minimum useful surface:
- - Connect/disconnect node
- Send JSON task/request node
- Async result delegate or polling getter
- Availability/status node
If the schema is immature, prefer these stable nodes first:
- - INLINECODE22
- INLINECODE23
- INLINECODE24
- INLINECODE25
Then layer typed nodes later.
Step 5: Keep JSON contracts explicit
Define small message envelopes like:
CODEBLOCK0
Return results like:
CODEBLOCK1
Keep these envelopes version-neutral and avoid leaking Unreal internals into the protocol unless necessary.
Step 6: Handle UE version differences conservatively
Prefer defensive code:
- - Use minimal includes in headers.
- Put module-heavy includes in
.cpp files. - Avoid relying on newer helper APIs when older equivalents exist.
- Gate minor differences with
ENGINE_MAJOR_VERSION / ENGINE_MINOR_VERSION checks when required.
Blueprint guidance
When asked for “all types of tasks including blueprints,” interpret that as at least:
- - Blueprint-callable connection nodes
- Blueprint-callable request/response nodes
- Blueprint events/delegates for async completion
- a sample actor/component/subsystem showing usage
Prefer these Unreal patterns:
- -
UBlueprintFunctionLibrary for stateless convenience methods - INLINECODE30 for persistent connection lifecycle
- INLINECODE31 for Blueprint events
Avoid over-engineering the first pass. A minimal plugin that compiles across 5.0+ beats a feature-rich plugin that only works on one minor version.
Remote Control guidance
Use Remote Control when the task is fundamentally editor-side. Expect HTTP/WebSocket-based control of exposed properties and functions. Do not describe it as a packaged-game runtime automation layer unless the project specifically wires that up.
If the user asks to manipulate Blueprints broadly, separate the request into:
- - editing/inspecting Blueprint-owned objects in the editor → Remote Control/editor tooling
- calling Blueprint nodes at runtime → plugin-exposed Blueprint library/subsystem
Suggested repository deliverables
When scaffolding an Unreal integration, prefer these outputs:
- -
references/architecture.md — integration decisions and tradeoffs - INLINECODE33 — Blueprint support patterns
- INLINECODE34 — drop-in UE plugin scaffold
- optional script(s) to copy/install the plugin into a target UE project
Validation checklist
Before claiming success, verify:
- - plugin descriptor exists and names the module(s)
- INLINECODE35 includes required dependencies only
- public headers are minimal
- Blueprint node names are clear and async behavior is documented
- no editor-only module is required for runtime-only use
- version claims are phrased as “designed for UE 5.0+” unless actually compiled/tested across versions
Resources
references/
Read these when needed:
- -
references/architecture.md for integration choices and compatibility rules - INLINECODE37 for Blueprint-facing API patterns
- INLINECODE38 for editor automation guidance
- INLINECODE39 for the default
/api/unreal/task request/response schema - INLINECODE41 for the verified target repo structure and integration implications
- INLINECODE42 for built-in Unreal systems to compose with before adding custom code
- INLINECODE43 for engine-source vs project-plugin deployment choices
- INLINECODE44 for mapping OpenClaw tasks onto confirmed engine systems
- INLINECODE45 for built-in Blueprint HTTP/JSON wiring
- INLINECODE46 for editor Python automation patterns
- INLINECODE47 for the OpenClaw-side handler boundary
- INLINECODE48 for project-level plugin enablement
- INLINECODE49 for a concrete
/api/unreal/task handler sketch - INLINECODE51 for repo-observed Remote Control / WebRemoteControl source touchpoints
- INLINECODE52 for concrete route/request/response observations from the inspected engine branch
scripts/
Use scripts/install_plugin.sh to copy the scaffold plugin into a target Unreal project.
assets/
Use assets/OpenClawUnrealPlugin/ as the drop-in plugin scaffold for UE 5.0+ projects.
Unreal Engine
概述
使用此技能可将OpenClaw风格的代理工作流连接到Unreal Engine 5.0+,并确保跨引擎小版本差异的兼容性。在评估过的Unreal Engine源码仓库中,已内置RemoteControl、HttpBlueprint、JsonBlueprintUtilities、PythonScriptPlugin和WebSockets支持,因此优先采用组合方式而非引擎修补。
优先选择以下集成路径:
- 1. 编辑器自动化路径:使用Unreal Remote Control进行编辑器时态的检查和自动化。
- 蓝图低代码路径:组合HttpBlueprint + JsonBlueprintUtilities实现蓝图驱动的请求/响应工作流。
- 项目/插件路径:添加轻量级插件,向C++和蓝图暴露OpenClaw特定的传输、认证、会话和任务钩子。
不要假设单一的Unreal API接口在所有5.x版本中表现一致。保持编译时依赖最小化,并隔离版本敏感代码。
集成策略
1. 首先选择合适的控制平面
根据任务选择:
- - 蓝图检查、编辑器对象/属性更改、调用暴露的编辑器函数、预设驱动工具
- 优先选择
Unreal Remote Control。
- 最适合编辑器时态编排,无需将代理逻辑深度嵌入游戏代码。
- - 蓝图优先的HTTP/JSON工作流,无需大量C++
- 优先选择内置的
HttpBlueprint +
JsonBlueprintUtilities。
- 最适合快速原型设计和设计师友好的任务流程。
- - 编辑器自动化,Python比C++/蓝图更合适
- 优先选择
PythonScriptPlugin。
- 最适合内容工具、批量编辑器脚本和快速迭代。
- - 打包游戏或PIE会话的运行时通信、蓝图工具节点、项目特定任务执行、自定义认证/传输
- 优先选择
项目插件。
- 同时使用:Remote Control用于编辑器端工作,适当使用内置蓝图/Python工具,以及用于运行时安全的OpenClaw特定行为的插件。
2. 保持广泛的版本兼容性
针对UE 5.0+
- - 优先选择API长期稳定的引擎模块:Core、CoreUObject、Engine、HTTP、Json、JsonUtilities、WebSockets。
- 将版本敏感代码封装在辅助函数或宏后面。
- 避免在运行时代码中依赖仅编辑器模块。
- 仅当任务确实需要编辑器扩展时,才将运行时/编辑器关注点分离到独立模块。
3. 将蓝图支持视为一等需求
当用户提到蓝图时,不要止步于C++管道。提供:
- - 用于一次性操作的UBlueprintFunctionLibrary节点
- 用于持久连接/状态的可选UGameInstanceSubsystem或UEngineSubsystem
- 用于异步结果的委托/事件接口
- 当类型化模式尚未确定时的简单JSON输入/JSON输出回退节点
默认架构
除非项目有其他要求,否则使用此思维模型:
- 编排任务,可选HTTP/WebSocket通信,可发出结构化JSON任务信封。
- Remote Control暴露编辑器可管理的对象/函数/属性。
- 提供蓝图节点和运行时传输。
- 接收任务信封,分派给蓝图/C++处理器,返回结构化结果。
任务模式
模式A:编辑器时态蓝图和资产任务
当目标为以下时使用:
- - 在编辑器中检查或调整Actor/组件
- 触发编辑器工具上的暴露函数
- 更新Remote Control预设上的属性
- 支持技术美术/虚拟制作风格的工作流
方法:
- 1. 确保项目启用Unreal Remote Control。
- 仅暴露所需的对象/函数/属性。
- 让OpenClaw调用Remote Control HTTP/WebSocket API。
- 保持破坏性/编辑器变更操作的明确性和范围限制。
适用场景:
- - 关卡设置辅助工具
- 虚拟制作控制
- 编辑器工具Actor/控件
- 批量属性更新
模式B:运行时或游戏玩法相关任务
当目标为以下时使用:
- - 将运行中的客户端/编辑器会话连接到OpenClaw
- 通过HTTP或WebSocket发送提示/任务/结果
- 使任务可从蓝图调用
- 支持打包构建或PIE行为
方法:
- 1. 添加运行时插件。
- 将传输放在子系统或管理器UObject中。
- 暴露简单的蓝图节点。
- 返回结构化结果和明确的错误信息。
适用场景:
- - AI驱动的NPC工具
- 基于运行时安全传输的编辑器内副驾驶面板
- 游戏测试钩子
- 诊断和遥测桥接
工作流程
按以下顺序执行。
步骤1:确定集成目标
确定:
- - 引擎版本或版本范围
- 仅编辑器 vs 运行时 vs 两者
- 是否必须直接支持蓝图
- 传输需求:HTTP、WebSocket、本地CLI桥接或混合
- 打包构建是否重要
如果无法访问源码仓库,请明确说明并继续使用基于标准的脚手架。
步骤2:检查项目结构
对于Unreal项目,查找:
- - *.uproject
- Source/
- Plugins/
- 现有模块的.Build.cs文件
- 任何现有的编辑器工具控件、子系统或自动化脚本
如果要生成新插件,优先放在Plugins//下。
步骤3:选择插件形态
默认情况下尽可能使用单个运行时模块。
仅在需要时创建额外模块:
- - 运行时模块用于打包/运行时安全功能
- 编辑器模块仅用于详情面板、菜单、自定义标签页或仅编辑器API
步骤4:暴露蓝图接口
最小有用接口:
- - 连接/断开节点
- 发送JSON任务/请求节点
- 异步结果委托或轮询获取器
- 可用性/状态节点
如果模式不成熟,优先使用以下稳定节点:
- - ConnectToOpenClaw(Url, ApiKey)
- DisconnectFromOpenClaw()
- SendTaskJson(TaskJson)
- GetConnectionStatus()
之后再添加类型化节点。
步骤5:保持JSON契约明确
定义小型消息信封,例如:
json
{
id: task-123,
type: runblueprinttask,
task: summarize_scene,
payload: {
target: /Game/Maps/TestMap
}
}
返回结果如下:
json
{
id: task-123,
ok: true,
result: {
summary: ...
},
error: null
}
保持这些信封版本中立,除非必要,避免将Unreal内部细节泄露到协议中。
步骤6:保守处理UE版本差异
优先使用防御性代码:
- - 在头文件中使用最少的包含。
- 将模块密集型包含放在.cpp文件中。
- 当存在旧等效API时,避免依赖较新的辅助API。
- 必要时使用ENGINEMAJORVERSION / ENGINEMINORVERSION检查来隔离小差异。
蓝图指导
当被要求包括蓝图在内的所有类型任务时,至少解释为:
- - 蓝图可调用的连接节点
- 蓝图可调用的请求/响应节点
- 用于异步完成的蓝图事件/委托
- 展示用法的示例Actor/组件/子系统
优先使用以下Unreal模式:
- - UBlueprintFunctionLibrary用于无状态便捷方法
- UGameInstanceSubsystem用于持久连接生命周期
- DECLAREDYNAMICMULTICASTDELEGATE*用于蓝图事件
避免过度设计第一版。一个能在5.0+版本编译的最小插件胜过仅在一个小版本上工作的功能丰富的插件。
Remote Control指导
当任务本质上是编辑器端时使用Remote Control。期望通过HTTP/WebSocket控制暴露的属性和函数。不要将其描述为打包游戏的运行时自动化层,除非项目特别配置了这一点。
如果用户要求广泛操作蓝图,将请求分为:
- - 在编辑器中编辑/检查蓝图拥有的对象 → Remote Control/编辑器工具
- 在运行时调用蓝图节点 → 插件暴露的蓝图库/子系统
建议的仓库交付物
在搭建Unreal集成时,优先输出以下内容:
- - references/architecture.md — 集成决策和权衡
- references/blueprints.md — 蓝图支持模式
- assets/OpenClawUnrealPlugin/ — 即插即用的UE插件脚手架
- 可选的将插件复制/安装到目标UE项目的脚本
验证清单
在声称成功之前,验证:
- - 插件描述符存在并命名了模块
- .Build.cs仅包含所需依赖
- 公共头文件最小化
- 蓝图节点名称清晰,异步行为有文档说明
- 仅运行时使用不需要编辑器模块
- 版本声明表述为为UE 5.0+设计,除非实际跨版本编译/测试