unreal-client-protocol
Interact with the running Unreal Engine editor via TCP bridge. Use when the user asks to call UFunctions or perform any Unreal Engine operation. This is the transport layer — see domain-specific skills (unreal-object-operation, unreal-material-editing, etc.) for specific operations.
- License 许可
- MIT
- 最近更新
- 2026-11-12
- Stars
- ★ 3
- Forks
- 1
01 前言 Front Matter
- name
- unreal-client-protocol
- description
- Interact with the running Unreal Engine editor via TCP bridge. Use when the user asks to call UFunctions or perform any Unreal Engine operation. This is the transport layer — see domain-specific skills (unreal-object-operation, unreal-material-editing, etc.) for specific operations.
02 资源文件 1
- 脚本scripts/UCP.py2.8 KB
03 SKILL.md 正文
UnrealClientProtocol
Communicate with a running UE editor through the UnrealClientProtocol TCP plugin. UCP exposes a single command — call any UFunction on any UObject via JSON. All functionality is provided through Blueprint Function Libraries that you invoke this way.
Installation(插件未装时)
UCP 不是 MCP 工具,而是要复制到工程 Plugins/ 的 C++ 插件。
检查:Plugins/UnrealClientProtocol/UnrealClientProtocol.uplugin 是否存在。
安装(在项目根目录执行其一):
# 优先:项目已安装 ue5-prod-skills pack
python .codebuddy/packs/ue5-prod-skills/scripts/deploy_ucp.py --project-path .
# 或直接用 ADS 仓库脚本
python F:/A_Works/ai-dev-system/backend/config_packs/ue5-prod-skills/shared/scripts/deploy_ucp.py --project-path .
安装后:重启 UE Editor,Edit → Plugins 确认 UnrealClientProtocol 已启用(监听 TCP 9876)。
在 ADS 网页助手里也可以说「安装 UCP」调用 install_ucp tool;CodeBuddy CLI 请用上面的脚本。
Invocation
When you read this SKILL.md, you already know its absolute path. Replace the filename with scripts/UCP.py to get UCP.py's path. For example, if this file is at X/Skills/unreal-client-protocol/SKILL.md, then UCP.py is at X/Skills/unreal-client-protocol/scripts/UCP.py. Do NOT search or glob for UCP.py.
Use PowerShell here-string (@'...'@) to pipe JSON into UCP.py. This avoids all quote/escape issues:
@'
{"object":"/Script/UnrealClientProtocol.Default__ObjectOperationLibrary","function":"FindObjectInstances","params":{"ClassName":"/Script/Engine.World"}}
'@ | python "<path-to-UCP.py>"
IMPORTANT: The @' must be on its own line, and '@ must also be at the start of its own line. This is PowerShell here-string syntax — the content between them is passed verbatim with zero escaping needed.
NEVER use echo '...' or echo "..." for JSON in PowerShell — quotes and braces will be corrupted.
Command Format
{"object":"<object_path>","function":"<func_name>","params":{...}}
object: Full UObject path — use CDO path for static/library functions, instance path for member methods.function: The UFunction name exactly as declared in C++.params: (optional) Map of parameter name -> value. UObject* params accept path strings. OmitWorldContextObject.
Parameter handling
- Out parameters (
TArray<AActor*>& OutActors, etc.) can be omitted fromparams— they are auto-initialized and returned as part of the result after execution. - Return values and all out parameters are serialized together in the response. For example, calling
GetAllActorsOfClasswith only{"ActorClass":"/Script/Engine.StaticMeshActor"}returns{"OutActors":["/Game/Maps/Main.Main:PersistentLevel.Cube_0", ...]}. - UObject* parameters accept full object paths as strings. The system resolves them automatically.
Complex Operation Strategy
When an operation involves predictable multi-step logic (loops, conditionals, bulk modifications), do NOT issue many individual calls. Instead:
- Write a Python script that performs all the steps in one go.
- Execute it via a single call to
UPythonScriptLibrary::ExecutePythonScript.
This dramatically reduces tool-call round-trips and gives you the full power of Python for flow control.
Core Principle — "Knowledge First"
You (the AI) already possess extensive knowledge of the Unreal Engine C++ / Blueprint API. Always leverage that knowledge to construct commands directly. Use DescribeObject / DescribeObjectFunction only when uncertain about project-specific classes.
Key Rules
- Construct from knowledge first. You know UE APIs. Just call them.
- Script for bulk operations. When you need loops or conditionals, write a Python script and execute it via
ExecutePythonScript. - WorldContext is auto-injected. Never pass
WorldContextObjectmanually. - Latent functions are not supported. Functions with
FLatentActionInfowill be rejected. - Check the
logfield. If the response contains alogarray, warnings or errors occurred. - Read error responses carefully. A failed call returns
{"error":"...", "expected":{...}}— use it to self-correct.
Object Path Conventions
| Kind | Pattern | Example |
|---|---|---|
| Static/CDO | /Script/<Module>.Default__<Class> |
/Script/Engine.Default__KismetSystemLibrary |
| Instance | /Game/Maps/<Level>.<Level>:PersistentLevel.<Actor> |
/Game/Maps/Main.Main:PersistentLevel.BP_Hero_C_0 |
| Class (for find) | /Script/<Module>.<Class> |
/Script/Engine.StaticMeshActor |
CDO class name convention: Drop the U or A prefix. UKismetSystemLibrary -> Default__KismetSystemLibrary.
Available Blueprint Function Libraries
UCP provides several function libraries. Each has its own Skill for detailed documentation:
| Library | CDO Path | Skill | Purpose |
|---|---|---|---|
UObjectOperationLibrary |
/Script/UnrealClientProtocol.Default__ObjectOperationLibrary |
unreal-object-operation |
Object property R/W, reflection, instance search |
UObjectEditorOperationLibrary |
/Script/UnrealClientProtocolEditor.Default__ObjectEditorOperationLibrary |
unreal-object-operation |
Undo/Redo transactions |
UAssetEditorOperationLibrary |
/Script/UnrealClientProtocolEditor.Default__AssetEditorOperationLibrary |
unreal-asset-operation |
Get AssetRegistry instance for asset queries |
UNodeCodeEditingLibrary |
/Script/UnrealClientProtocolEditor.Default__NodeCodeEditingLibrary |
unreal-material-editing / unreal-blueprint-editing |
Unified node graph read/write (Material, Blueprint) |
UActorEditorOperationLibrary |
/Script/UnrealClientProtocolEditor.Default__ActorEditorOperationLibrary |
unreal-actor-editing |
Actor operations (placeholder) |
UPIEOperationLibrary |
/Script/UnrealClientProtocolEditor.Default__PIEOperationLibrary |
unreal-pie-control |
Start/stop/pause PIE and SIE sessions |
ULiveCodingOperationLibrary |
/Script/UnrealClientProtocolEditor.Default__LiveCodingOperationLibrary |
unreal-live-coding |
Live Coding compile (deferred response) |
Response Format
- Success: Returns the result value directly, no wrapper.
- Failure: Returns
{"error":"...", "expected":{...}}whereexpectedcontains the function signature. - Transaction ID: Every response includes an
"id"field (e.g."UCP-A1B2C3D4"), automatically generated by the plugin. This ID is also the Undo transaction description — record it for safe undo (seeunreal-object-operationskill). - Deferred Response: Functions returning
FUCPDeferredResponseuse async execution — UCP.py keeps the TCP connection open and receives the result when the operation completes. No polling needed. SetUE_TIMEOUTto a larger value for long operations (e.g.$env:UE_TIMEOUT = "120"for Live Coding compile). - Log: If warnings/errors occurred, a
logfield (string array) is appended. - Log level: Add
"log_level":"all"to any request to capture all log levels (default captures Warning+). Options:"all","log","display","warning"(default),"error".
04 同仓库更多 Skills
webapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
internal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.).
web-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.
frontend-design
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.
algorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.