unreal について
PlayUnreal 形式の外部自動化で Unreal Engine 5.x を操作する開発中のスキルです。セットアップ、Remote Control の起動方法、セレクター、Python API の目標仕様を説明します。
主な機能
- 01外部自動化で Unreal Engine 5.x を操作
- 02Remote Control と Automation Driver を設定
- 03ID とパスのセレクターを使用
- 04PlayUnreal Python API を参照
- 05エディターとパッケージビルドに対応
活用シーン
- 01Unreal プロジェクトの自動化準備
- 02自動化 ID による UMG ウィジェット指定
- 03Remote 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 ドライバーアクターまたはサブシステムをマップに配置します。
- 安定したセレクターを使えるように、主要な UMG ウィジェットに自動化 ID を付けます。
- Remote Control は LAN/VPN 内でのみ使用します。
セレクター戦略
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 対応