mcpField
U
unreal

unreal

github.com/randroids-dojo开发4663 次安装3 周前更新
代码仓库

关于 unreal

用于通过 PlayUnreal 风格的外部自动化控制 Unreal Engine 5.x 的开发中 Skill,涵盖配置、Remote Control 启动方式、选择器和 Python API 目标。

主要功能

  1. 01外部自动化控制 Unreal Engine 5.x
  2. 02配置 Remote Control 和 Automation Driver
  3. 03使用 ID 和路径选择器
  4. 04提供 PlayUnreal Python API 参考
  5. 05涵盖编辑器和打包构建

适用场景

  1. 01为 Unreal 项目配置自动化
  2. 02通过自动化 ID 定位 UMG 控件
  3. 03使用 Remote Control 启动编辑器或打包构建

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/randroids-dojo/skills --skill unreal

安装后在 Claude Code 中输入/unreal确认已加载。

包含的文件

除 SKILL.md 外,安装时一起下载的参考资料和脚本。

.claude-plugin/
plugin.json
commands/
unreal.md
references/
automation-driver.md
playunreal.md
remote-control.md
umg-automation.md
scripts/
rc_wait_ready.py
run_e2e.py
ue_launch.py

详细介绍

Unreal 技能(WIP)

使用 PlayUnreal 风格的外部控制自动化 Unreal Engine 5.x。

状态:WIP。PlayUnreal 仓库:https://github.com/Randroids-Dojo/PlayUnreal

快速参考

# Launch editor with Remote Control enabled
UnrealEditor "/path/MyGame.uproject" -ExecCmds="WebControl.StartServer"

# Packaged build (enable Remote Control)
MyGame.exe -RCWebControlEnable -RCWebInterfaceEnable -ExecCmds="WebControl.StartServer"

# Wait for Remote Control and ping a PlayUnreal automation actor
python plugins/unreal/scripts/rc_wait_ready.py \
  --host 127.0.0.1 --port 30010 \
  --object-path "/Game/Maps/Main.Main:PersistentLevel.PlayUnrealDriver_1"

设置清单

  • 启用 Remote Control 和 Automation Driver 插件。
  • 将 PlayUnrealAutomation 插件添加到项目中。
  • 在关卡中放置 PlayUnreal 驱动器 Actor 或子系统。
  • 为关键 UMG 控件添加自动化 ID,以使用稳定的选择器。
  • 仅在 LAN/VPN 上启用 Remote Control。

选择器策略

  • id=StartButton 对应 Automation Driver 的 By::Id。
  • path=#Menu//Start/<SButton> 对应 By::Path。
  • 如有需要,可通过自定义遍历实现 text="Start"。

PlayUnreal Python(目标 API)

from playunreal import Unreal

async with Unreal.launch(
    uproject="MyGame.uproject",
    map="/Game/Maps/MainMenu",
    remote_control=True,
) as ue:
    page = ue.page()
    await page.locator("id=StartButton").click()
    await page.locator("id=HUDRoot").wait_for_visible()
    await page.screenshot("artifacts/started.png")

打包构建

  • 使用 -RCWebControlEnable -RCWebInterfaceEnable。
  • 如果使用 Remote Control 预设,请确保预设和资源已暂存。

参考资料

  • references/remote-control.md
  • references/automation-driver.md
  • references/umg-automation.md
  • references/playunreal.md

评论

支持 Markdown