关于 unreal
用于通过 PlayUnreal 风格的外部自动化控制 Unreal Engine 5.x 的开发中 Skill,涵盖配置、Remote Control 启动方式、选择器和 Python API 目标。
主要功能
- 01外部自动化控制 Unreal Engine 5.x
- 02配置 Remote Control 和 Automation Driver
- 03使用 ID 和路径选择器
- 04提供 PlayUnreal Python API 参考
- 05涵盖编辑器和打包构建
适用场景
- 01为 Unreal 项目配置自动化
- 02通过自动化 ID 定位 UMG 控件
- 03使用 Remote Control 启动编辑器或打包构建
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ randroids-dojo/ skills --skill unreal安装后在 Claude Code 中输入/unreal确认已加载。
包含的文件
除 SKILL.md 外,安装时一起下载的参考资料和脚本。
.claude-plugin/plugin.jsoncommands/unreal.mdreferences/automation-driver.mdplayunreal.mdremote-control.mdumg-automation.mdscripts/rc_wait_ready.pyrun_e2e.pyue_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.mdreferences/automation-driver.mdreferences/umg-automation.mdreferences/playunreal.md
评论
支持 Markdown