ueagentdevkit 0.2.0__tar.gz → 0.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ueagentdevkit-0.3.0/CHANGELOG.md +26 -0
- ueagentdevkit-0.3.0/Connect-UE.cmd +10 -0
- ueagentdevkit-0.3.0/Connect-UE.ps1 +19 -0
- ueagentdevkit-0.3.0/Examples/BlankBlueprint/timeline.json +18 -0
- ueagentdevkit-0.3.0/Install-Shortcut.ps1 +11 -0
- {ueagentdevkit-0.2.0 → ueagentdevkit-0.3.0}/MANIFEST.in +2 -1
- ueagentdevkit-0.3.0/PKG-INFO +61 -0
- ueagentdevkit-0.3.0/README.md +39 -0
- ueagentdevkit-0.3.0/README.zh-CN.md +3 -0
- {ueagentdevkit-0.2.0 → ueagentdevkit-0.3.0}/Skills/ue-automation-evidence/SKILL.md +2 -0
- ueagentdevkit-0.3.0/Skills/ue-editor-connection/SKILL.md +8 -0
- ueagentdevkit-0.3.0/THIRD_PARTY.md +5 -0
- ueagentdevkit-0.3.0/Test-Play.cmd +10 -0
- ueagentdevkit-0.3.0/Tools/AssetInspector/godot_pck.py +293 -0
- ueagentdevkit-0.3.0/Tools/Capture/ViewportCapture/Source/ViewportCapture/Private/ViewportFrames.cpp +78 -0
- ueagentdevkit-0.3.0/Tools/Capture/ViewportCapture/Source/ViewportCapture/Public/ViewportFrames.h +12 -0
- ueagentdevkit-0.3.0/Tools/Capture/ViewportCapture/Source/ViewportCapture/ViewportCapture.Build.cs +6 -0
- ueagentdevkit-0.3.0/Tools/Capture/ViewportCapture/ViewportCapture.uplugin +1 -0
- ueagentdevkit-0.3.0/Tools/Capture/session.py +83 -0
- {ueagentdevkit-0.2.0 → ueagentdevkit-0.3.0}/Tools/Hygiene/recovery.py +32 -13
- ueagentdevkit-0.3.0/Tools/TestHost/AgentDevTestHost.uproject +16 -0
- ueagentdevkit-0.3.0/Tools/TestHost/MovementFixture.py +32 -0
- ueagentdevkit-0.3.0/Tools/TestHost/PIEInputSequence.json +42 -0
- ueagentdevkit-0.3.0/Tools/TestHost/PIEMovement.json +9 -0
- ueagentdevkit-0.3.0/Tools/TestHost/Source/AgentDevTestHost/AgentDevTestHost.Build.cs +9 -0
- ueagentdevkit-0.3.0/Tools/TestHost/Source/AgentDevTestHost/DevKitViewport.cpp +30 -0
- ueagentdevkit-0.3.0/Tools/TestHost/Source/AgentDevTestHost/DevKitViewport.h +13 -0
- ueagentdevkit-0.3.0/Tools/TestHost/Source/AgentDevTestHost/Observation.cpp +27 -0
- ueagentdevkit-0.3.0/Tools/TestHost/Source/AgentDevTestHostEditor.Target.cs +12 -0
- ueagentdevkit-0.3.0/Tools/TestHost/UAPSmoke.py +122 -0
- ueagentdevkit-0.3.0/Tools/compare_behavior.py +35 -0
- ueagentdevkit-0.3.0/Tools/connect_editor.py +430 -0
- {ueagentdevkit-0.2.0 → ueagentdevkit-0.3.0}/Tools/environment.py +6 -2
- ueagentdevkit-0.3.0/Tools/make_pie_lab.py +44 -0
- ueagentdevkit-0.3.0/Tools/mcp_readback.py +59 -0
- ueagentdevkit-0.3.0/Tools/media.py +59 -0
- ueagentdevkit-0.3.0/Tools/mux.py +145 -0
- ueagentdevkit-0.3.0/Tools/optional_diagnostics.py +69 -0
- ueagentdevkit-0.3.0/Tools/pie_behavior.py +196 -0
- ueagentdevkit-0.3.0/Tools/provider/LICENSE +21 -0
- ueagentdevkit-0.3.0/Tools/provider/capabilities.json +537 -0
- ueagentdevkit-0.3.0/Tools/provider/scripts/connect.py +288 -0
- ueagentdevkit-0.3.0/Tools/provider/scripts/discover.py +257 -0
- ueagentdevkit-0.3.0/Tools/provider/scripts/enable_plugins.py +249 -0
- ueagentdevkit-0.3.0/Tools/provider/scripts/launch_editor.py +257 -0
- ueagentdevkit-0.3.0/Tools/provider/scripts/pinwright_calls.py +100 -0
- ueagentdevkit-0.3.0/Tools/provider/scripts/probe.py +108 -0
- ueagentdevkit-0.3.0/Tools/provider/scripts/register_client.py +366 -0
- ueagentdevkit-0.3.0/Tools/provider/scripts/routing.py +141 -0
- ueagentdevkit-0.3.0/Tools/provider/scripts/run_bridge.py +14 -0
- ueagentdevkit-0.3.0/Tools/record.py +93 -0
- ueagentdevkit-0.3.0/Tools/setup.py +97 -0
- ueagentdevkit-0.3.0/Tools/timeline.py +114 -0
- ueagentdevkit-0.3.0/Tools/uap_lab.py +137 -0
- ueagentdevkit-0.3.0/Tools/umg_readback.py +70 -0
- ueagentdevkit-0.3.0/pyproject.toml +57 -0
- ueagentdevkit-0.3.0/tests/test_diagnostics.py +30 -0
- ueagentdevkit-0.3.0/tests/test_godot_pck.py +180 -0
- ueagentdevkit-0.3.0/tests/test_player_route.py +27 -0
- ueagentdevkit-0.3.0/tests/test_registration.py +29 -0
- ueagentdevkit-0.3.0/tests/test_timeline.py +23 -0
- {ueagentdevkit-0.2.0 → ueagentdevkit-0.3.0}/ueagent.py +27 -16
- ueagentdevkit-0.3.0/ueagentdevkit.egg-info/PKG-INFO +61 -0
- ueagentdevkit-0.3.0/ueagentdevkit.egg-info/SOURCES.txt +90 -0
- {ueagentdevkit-0.2.0 → ueagentdevkit-0.3.0}/ueagentdevkit.egg-info/requires.txt +1 -0
- ueagentdevkit-0.2.0/CHANGELOG.md +0 -8
- ueagentdevkit-0.2.0/PKG-INFO +0 -14
- ueagentdevkit-0.2.0/README.md +0 -39
- ueagentdevkit-0.2.0/README.zh-CN.md +0 -33
- ueagentdevkit-0.2.0/THIRD_PARTY.md +0 -5
- ueagentdevkit-0.2.0/pyproject.toml +0 -39
- ueagentdevkit-0.2.0/ueagentdevkit.egg-info/PKG-INFO +0 -14
- ueagentdevkit-0.2.0/ueagentdevkit.egg-info/SOURCES.txt +0 -39
- {ueagentdevkit-0.2.0 → ueagentdevkit-0.3.0}/Association-Doctor.cmd +0 -0
- {ueagentdevkit-0.2.0 → ueagentdevkit-0.3.0}/CONTRIBUTING.md +0 -0
- {ueagentdevkit-0.2.0 → ueagentdevkit-0.3.0}/Examples/BlankBlueprint/BlankBlueprint.uproject +0 -0
- {ueagentdevkit-0.2.0 → ueagentdevkit-0.3.0}/Examples/BlankBlueprint/profile.json +0 -0
- {ueagentdevkit-0.2.0 → ueagentdevkit-0.3.0}/External/unreal-association-doctor/LICENSE +0 -0
- {ueagentdevkit-0.2.0 → ueagentdevkit-0.3.0}/External/unreal-association-doctor/Repair-UnrealAssociation.ps1 +0 -0
- {ueagentdevkit-0.2.0 → ueagentdevkit-0.3.0}/External/unreal-association-doctor/Start-Doctor.ps1 +0 -0
- {ueagentdevkit-0.2.0 → ueagentdevkit-0.3.0}/Hooks/check_staged.py +0 -0
- {ueagentdevkit-0.2.0 → ueagentdevkit-0.3.0}/Hooks/install.py +0 -0
- {ueagentdevkit-0.2.0 → ueagentdevkit-0.3.0}/Hooks/pre-commit +0 -0
- {ueagentdevkit-0.2.0 → ueagentdevkit-0.3.0}/LICENSE +0 -0
- {ueagentdevkit-0.2.0 → ueagentdevkit-0.3.0}/Manage-Projects.cmd +0 -0
- {ueagentdevkit-0.2.0 → ueagentdevkit-0.3.0}/SECURITY.md +0 -0
- {ueagentdevkit-0.2.0 → ueagentdevkit-0.3.0}/Skills/ue-project-hygiene/SKILL.md +0 -0
- {ueagentdevkit-0.2.0 → ueagentdevkit-0.3.0}/Tools/Hygiene/audit.py +0 -0
- {ueagentdevkit-0.2.0 → ueagentdevkit-0.3.0}/Tools/Hygiene/cli.py +0 -0
- {ueagentdevkit-0.2.0 → ueagentdevkit-0.3.0}/Tools/Hygiene/lifecycle.py +0 -0
- {ueagentdevkit-0.2.0 → ueagentdevkit-0.3.0}/Tools/Hygiene/registry_scan.py +0 -0
- {ueagentdevkit-0.2.0 → ueagentdevkit-0.3.0}/Tools/mcp_endpoint.py +0 -0
- {ueagentdevkit-0.2.0 → ueagentdevkit-0.3.0}/Tools/project_profile.py +0 -0
- {ueagentdevkit-0.2.0 → ueagentdevkit-0.3.0}/Tools/report.py +0 -0
- {ueagentdevkit-0.2.0 → ueagentdevkit-0.3.0}/setup.cfg +0 -0
- {ueagentdevkit-0.2.0 → ueagentdevkit-0.3.0}/tests/test_project_profile.py +0 -0
- {ueagentdevkit-0.2.0 → ueagentdevkit-0.3.0}/tests/test_report_states.py +0 -0
- {ueagentdevkit-0.2.0 → ueagentdevkit-0.3.0}/ueagentdevkit.egg-info/dependency_links.txt +0 -0
- {ueagentdevkit-0.2.0 → ueagentdevkit-0.3.0}/ueagentdevkit.egg-info/entry_points.txt +0 -0
- {ueagentdevkit-0.2.0 → ueagentdevkit-0.3.0}/ueagentdevkit.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [0.3.0](https://github.com/redtidev1918/UEAgentDevKit/compare/v0.2.0...v0.3.0) (2026-11-28)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* restore UE editor and capture feature parity ([558e58b](https://github.com/redtidev1918/UEAgentDevKit/commit/558e58b0409155a0948feb8d1c551af9f15e39d8))
|
|
9
|
+
* verify public toolchain consumers and ship feature parity ([b7ea0a8](https://github.com/redtidev1918/UEAgentDevKit/commit/b7ea0a8a09e6120978ee84e43151a7e3d97d7857))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Documentation
|
|
13
|
+
|
|
14
|
+
* link download previews to the validation scope ([419044c](https://github.com/redtidev1918/UEAgentDevKit/commit/419044ce68dcf15d6a41153b7c173f8445ba1089))
|
|
15
|
+
* make README links work outside the checkout ([16f12ef](https://github.com/redtidev1918/UEAgentDevKit/commit/16f12ef170f23f02e50cdeb2a4a32030d33b93a2))
|
|
16
|
+
* **package:** add PyPI description and project links ([8abd1db](https://github.com/redtidev1918/UEAgentDevKit/commit/8abd1db5b5d9e0e0056b21b07f1f5278e49b537b))
|
|
17
|
+
* publish bilingual docsite documentation ([831ba66](https://github.com/redtidev1918/UEAgentDevKit/commit/831ba66828a10af89be7f3903545a2233c35ebe0))
|
|
18
|
+
* refresh download page (v0.2.0) ([9867f1d](https://github.com/redtidev1918/UEAgentDevKit/commit/9867f1d1c0d844b0cba59f7057fad33715a4ccdd))
|
|
19
|
+
* simplify product pages and add a terminal-led home ([6324207](https://github.com/redtidev1918/UEAgentDevKit/commit/6324207a32c50ec4c9598d60b054ca3d0e19270a))
|
|
20
|
+
|
|
21
|
+
## 0.2.0
|
|
22
|
+
|
|
23
|
+
- Added an installable `ueagent` CLI, explicit JSON project profiles and a native Automation mode independent of installed MCP providers.
|
|
24
|
+
- Made disk reserve and warning thresholds configurable across volumes.
|
|
25
|
+
- Added an explicit loopback MCP tool-list probe and a blank Blueprint Automation example.
|
|
26
|
+
- Kept private workflows, experimental game capture and recorded project evidence outside the reviewed release source.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
param(
|
|
2
|
+
[string]$Project,
|
|
3
|
+
[string]$Capability = 'auto',
|
|
4
|
+
[string]$Client = 'codex',
|
|
5
|
+
[string]$Engine,
|
|
6
|
+
[switch]$Preview,
|
|
7
|
+
[switch]$EnablePlugins,
|
|
8
|
+
[switch]$NoRegister
|
|
9
|
+
)
|
|
10
|
+
$arguments = @('connect', '--capability', $Capability, '--client', $Client)
|
|
11
|
+
if ($Project) { $arguments += @('--project', (Resolve-Path -LiteralPath $Project).Path) }
|
|
12
|
+
if ($Engine) { $arguments += @('--engine', $Engine) }
|
|
13
|
+
if ($Preview) { $arguments += '--dry-run' }
|
|
14
|
+
if ($EnablePlugins) { $arguments += '--auto-enable' }
|
|
15
|
+
if ($NoRegister) { $arguments += '--no-register' }
|
|
16
|
+
$source = Join-Path $PSScriptRoot 'ueagent.py'
|
|
17
|
+
if (Test-Path -LiteralPath $source) { & uv run --project $PSScriptRoot python $source @arguments }
|
|
18
|
+
else { & (Join-Path $PSScriptRoot 'ueagent.exe') @arguments }
|
|
19
|
+
exit $LASTEXITCODE
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"events": "events.jsonl",
|
|
3
|
+
"frame_field": "frame",
|
|
4
|
+
"type_field": "type",
|
|
5
|
+
"time_field": "elapsed_seconds",
|
|
6
|
+
"sample_kind": "sample",
|
|
7
|
+
"sample_stride": 1,
|
|
8
|
+
"include": [
|
|
9
|
+
"input",
|
|
10
|
+
"line",
|
|
11
|
+
"camera",
|
|
12
|
+
"elapsed_seconds",
|
|
13
|
+
"phase"
|
|
14
|
+
],
|
|
15
|
+
"image_glob": "Frame-*.png",
|
|
16
|
+
"image_pattern": "Frame-(?P<frame>\\d+)-Line-(?P<line>\\d+)\\.png",
|
|
17
|
+
"basis": "Screenshot request frame and script line; rendered presentation time and capture delay are unknown."
|
|
18
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
$ErrorActionPreference = 'Stop'
|
|
2
|
+
$path = Join-Path ([Environment]::GetFolderPath('DesktopDirectory')) 'Connect Unreal Engine.lnk'
|
|
3
|
+
$shell = New-Object -ComObject WScript.Shell
|
|
4
|
+
$link = $shell.CreateShortcut($path)
|
|
5
|
+
$target = Join-Path $PSScriptRoot 'Connect-UE.cmd'
|
|
6
|
+
if ((Test-Path $path) -and $link.TargetPath -ne $target) { throw "Another shortcut already exists at $path" }
|
|
7
|
+
$link.TargetPath = $target
|
|
8
|
+
$link.WorkingDirectory = $PSScriptRoot
|
|
9
|
+
$link.Description = 'Connect an Unreal Engine project using AUTO discovery'
|
|
10
|
+
$link.Save()
|
|
11
|
+
Write-Output $path
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
include Association-Doctor.cmd Manage-Projects.cmd README.zh-CN.md THIRD_PARTY.md
|
|
2
2
|
include CONTRIBUTING.md SECURITY.md CHANGELOG.md
|
|
3
|
-
|
|
3
|
+
include Connect-UE.cmd Connect-UE.ps1 Test-Play.cmd Install-Shortcut.ps1
|
|
4
|
+
recursive-include Examples *.uproject *.json
|
|
4
5
|
recursive-include Hooks *.py pre-commit
|
|
5
6
|
recursive-include Skills SKILL.md
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ueagentdevkit
|
|
3
|
+
Version: 0.3.0
|
|
4
|
+
Summary: Unreal Engine project diagnostics, native Automation, evidence, and storage tools for Windows
|
|
5
|
+
License-Expression: MIT
|
|
6
|
+
Project-URL: Documentation, https://redtidev1918.github.io/UEAgentDevKit/
|
|
7
|
+
Project-URL: Repository, https://github.com/redtidev1918/UEAgentDevKit
|
|
8
|
+
Project-URL: Issues, https://github.com/redtidev1918/UEAgentDevKit/issues
|
|
9
|
+
Project-URL: Releases, https://github.com/redtidev1918/UEAgentDevKit/releases
|
|
10
|
+
Requires-Python: >=3.11
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Requires-Dist: mcp<2,>=1.17
|
|
14
|
+
Provides-Extra: mcp
|
|
15
|
+
Requires-Dist: mcp<2,>=1.17; extra == "mcp"
|
|
16
|
+
Provides-Extra: media
|
|
17
|
+
Requires-Dist: imageio-ffmpeg<1,>=0.6; extra == "media"
|
|
18
|
+
Requires-Dist: obsws-python<2,>=1.7; extra == "media"
|
|
19
|
+
Provides-Extra: windows
|
|
20
|
+
Requires-Dist: pywinauto==0.6.9; extra == "windows"
|
|
21
|
+
Dynamic: license-file
|
|
22
|
+
|
|
23
|
+
# UEAgentDevKit
|
|
24
|
+
|
|
25
|
+
Unreal Engine 开发、测试与工程管理工具。
|
|
26
|
+
|
|
27
|
+
[文档](https://redtidev1918.github.io/UEAgentDevKit/) · [PyPI](https://pypi.org/project/ueagentdevkit/) · [下载](https://github.com/redtidev1918/UEAgentDevKit/releases) · [English](https://github.com/redtidev1918/UEAgentDevKit/blob/main/README.en.md)
|
|
28
|
+
|
|
29
|
+
## 安装
|
|
30
|
+
|
|
31
|
+
```powershell
|
|
32
|
+
uv tool install ueagentdevkit
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
也可在 Python 虚拟环境中运行 `pip install ueagentdevkit`。
|
|
36
|
+
|
|
37
|
+
## 使用
|
|
38
|
+
|
|
39
|
+
```powershell
|
|
40
|
+
ueagent doctor --project .\MyGame.uproject
|
|
41
|
+
ueagent run --native --project .\MyGame.uproject --test MyGame.Smoke
|
|
42
|
+
ueagent hygiene audit .
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
将示例中的工程路径和测试名称换成实际值。[快速开始](https://redtidev1918.github.io/UEAgentDevKit/QUICKSTART.html)
|
|
46
|
+
|
|
47
|
+
## 功能
|
|
48
|
+
|
|
49
|
+
- 检查 UE 工程、引擎与编译环境
|
|
50
|
+
- 运行原生自动化测试和检查报告
|
|
51
|
+
- 诊断 `.uproject` 文件关联并探测本地 MCP 服务
|
|
52
|
+
- 检查磁盘预算、缓存和 Git LFS
|
|
53
|
+
- [为 Agent 安装 Skills](https://redtidev1918.github.io/UEAgentDevKit/Agent/GETTING_STARTED.html)
|
|
54
|
+
|
|
55
|
+
运行 `ueagent setup`,再将工程拖入 `Connect-UE.cmd`,或运行 `ueagent connect MyGame.uproject`。普通蓝图、动画图和 UMG 按已安装的提供方连接。[逐项验收记录](docs/Reference/COMPATIBILITY.md)
|
|
56
|
+
|
|
57
|
+
## 兼容性
|
|
58
|
+
|
|
59
|
+
**Windows x64 · Python 3.11+ · MIT**
|
|
60
|
+
|
|
61
|
+
已在同一工作站验证 UE 5.8.4,并在 UE 5.4.4 验证 PinWright 蓝图读写。仅预装 UE 的独立 Windows 环境尚未实测。[支持矩阵](https://redtidev1918.github.io/UEAgentDevKit/Reference/COMPATIBILITY.html) · [MIT 许可证](LICENSE)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# UEAgentDevKit
|
|
2
|
+
|
|
3
|
+
Unreal Engine 开发、测试与工程管理工具。
|
|
4
|
+
|
|
5
|
+
[文档](https://redtidev1918.github.io/UEAgentDevKit/) · [PyPI](https://pypi.org/project/ueagentdevkit/) · [下载](https://github.com/redtidev1918/UEAgentDevKit/releases) · [English](https://github.com/redtidev1918/UEAgentDevKit/blob/main/README.en.md)
|
|
6
|
+
|
|
7
|
+
## 安装
|
|
8
|
+
|
|
9
|
+
```powershell
|
|
10
|
+
uv tool install ueagentdevkit
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
也可在 Python 虚拟环境中运行 `pip install ueagentdevkit`。
|
|
14
|
+
|
|
15
|
+
## 使用
|
|
16
|
+
|
|
17
|
+
```powershell
|
|
18
|
+
ueagent doctor --project .\MyGame.uproject
|
|
19
|
+
ueagent run --native --project .\MyGame.uproject --test MyGame.Smoke
|
|
20
|
+
ueagent hygiene audit .
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
将示例中的工程路径和测试名称换成实际值。[快速开始](https://redtidev1918.github.io/UEAgentDevKit/QUICKSTART.html)
|
|
24
|
+
|
|
25
|
+
## 功能
|
|
26
|
+
|
|
27
|
+
- 检查 UE 工程、引擎与编译环境
|
|
28
|
+
- 运行原生自动化测试和检查报告
|
|
29
|
+
- 诊断 `.uproject` 文件关联并探测本地 MCP 服务
|
|
30
|
+
- 检查磁盘预算、缓存和 Git LFS
|
|
31
|
+
- [为 Agent 安装 Skills](https://redtidev1918.github.io/UEAgentDevKit/Agent/GETTING_STARTED.html)
|
|
32
|
+
|
|
33
|
+
运行 `ueagent setup`,再将工程拖入 `Connect-UE.cmd`,或运行 `ueagent connect MyGame.uproject`。普通蓝图、动画图和 UMG 按已安装的提供方连接。[逐项验收记录](docs/Reference/COMPATIBILITY.md)
|
|
34
|
+
|
|
35
|
+
## 兼容性
|
|
36
|
+
|
|
37
|
+
**Windows x64 · Python 3.11+ · MIT**
|
|
38
|
+
|
|
39
|
+
已在同一工作站验证 UE 5.8.4,并在 UE 5.4.4 验证 PinWright 蓝图读写。仅预装 UE 的独立 Windows 环境尚未实测。[支持矩阵](https://redtidev1918.github.io/UEAgentDevKit/Reference/COMPATIBILITY.html) · [MIT 许可证](LICENSE)
|
|
@@ -6,3 +6,5 @@ description: Run an exact Unreal Engine Automation test and verify its evidence
|
|
|
6
6
|
Run `ueagent doctor --project <uproject>` first. Then run `ueagent run --native --project <uproject> --test <exact-test-name>`. For a stored configuration, pass `--profile <profile.json>` instead. Preserve the engine version, exact test name, editor exit code and the generated Automation index. Verify an existing index with `ueagent check-report <index.json> --test <exact-test-name>`.
|
|
7
7
|
|
|
8
8
|
Use an isolated test project or close the target editor before a native run. For engine-supported temporary-world tests, prefer the engine's test world wrapper. Keep business assertions in the project and verify teardown with repeated runs in the same process. Record visual, audio and real-input behavior separately from NullRHI results.
|
|
9
|
+
|
|
10
|
+
For rendered input tests use `ueagent pie --project PROJECT --profile SCENARIO`. Use the same project, profile and input path before and after an edit, then run `ueagent compare BEFORE AFTER`. For the disposable host, `ueagent uap-lab --audio --standalone-trace` builds the player and capture plugin and collects a rendered clip, master mix and standalone trace. Install the media extra for encoding.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ue-editor-connection
|
|
3
|
+
description: Connect an installed Unreal Editor provider and verify Blueprint, AnimGraph and UMG operations.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Run `ueagent setup`, then `ueagent connect PROJECT.uproject --dry-run`. To enable a locally installed provider, select the required capability and inspect the plan before using `--auto-enable`. Connect from the intended Agent client. Match the project path, editor PID and listener owner. For UMG, install the licensed plugin and configure its matching frontend with `ueagent setup --umg-plugin PATH`. Pass `--widget /Game/Path/WBP_Name` to read an existing widget tree.
|
|
7
|
+
|
|
8
|
+
Inspect the selected provider's live schema. For a Blueprint, read an event and its outgoing edge. For an AnimGraph, read the Output Pose source, state machine and connected pins. For UMG, read the root and a named child. Test changes in a disposable project, compile and save the asset, then reopen and check the edited property or edge. Record client calls, independent SDK results and runtime assertions separately.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Third-party notices
|
|
2
|
+
|
|
3
|
+
The included Unreal Association Doctor scripts are covered by the adjacent upstream MIT license. Preserve that license and its copyright notice when distributing those scripts.
|
|
4
|
+
|
|
5
|
+
Tools/provider includes the public unreal-editor-mcp router and transport scripts from commit 1e1f19a734607fe0f5eeb81f4c8d25c849dbb55f, under its adjacent MIT license. Unreal Engine and commercial editor plugins are installed separately. The MCP Python SDK retains its upstream license. The optional UAP lab fetches UnrealAgentPlayer at the revision pinned in Tools/uap_lab.py and retains its license in the lab.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
@echo off
|
|
2
|
+
setlocal
|
|
3
|
+
if exist "%~dp0ueagent.py" (
|
|
4
|
+
uv run --project "%~dp0." --extra media python "%~dp0ueagent.py" uap-lab --video %*
|
|
5
|
+
) else (
|
|
6
|
+
"%~dp0ueagent.exe" uap-lab --video %*
|
|
7
|
+
)
|
|
8
|
+
set "result=%errorlevel%"
|
|
9
|
+
if "%~1"=="" pause
|
|
10
|
+
exit /b %result%
|
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
"""Generic read-only Godot PCK (v2/v3/v4) indexer and selective extractor.
|
|
2
|
+
|
|
3
|
+
Strictly read-only on source .pck files. Enforces path-traversal guards,
|
|
4
|
+
extraction byte budgets, and records SHA-256 digests for every read or
|
|
5
|
+
extracted entry. Contains zero game-specific hardcoding.
|
|
6
|
+
"""
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
import argparse
|
|
10
|
+
from collections import Counter
|
|
11
|
+
from dataclasses import asdict, dataclass
|
|
12
|
+
import hashlib
|
|
13
|
+
import json
|
|
14
|
+
import os
|
|
15
|
+
from pathlib import Path, PurePosixPath
|
|
16
|
+
import struct
|
|
17
|
+
import sys
|
|
18
|
+
from typing import Any
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
PCK_MAGIC = b"GDPC"
|
|
22
|
+
FLAG_DIR_ENCRYPTED = 1 << 0
|
|
23
|
+
FLAG_REL_FILEBASE = 1 << 1
|
|
24
|
+
ENTRY_FLAG_ENCRYPTED = 1 << 0
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
@dataclass(frozen=True)
|
|
28
|
+
class PckEntry:
|
|
29
|
+
path: str
|
|
30
|
+
offset: int
|
|
31
|
+
size: int
|
|
32
|
+
md5: str
|
|
33
|
+
flags: int
|
|
34
|
+
encrypted: bool
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
@dataclass(frozen=True)
|
|
38
|
+
class PckHeader:
|
|
39
|
+
format_version: int
|
|
40
|
+
engine_major: int
|
|
41
|
+
engine_minor: int
|
|
42
|
+
engine_patch: int
|
|
43
|
+
flags: int
|
|
44
|
+
dir_encrypted: bool
|
|
45
|
+
file_base: int
|
|
46
|
+
dir_offset: int
|
|
47
|
+
file_size: int
|
|
48
|
+
file_count: int
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def _sanitize_rel_path(logical_path: str) -> PurePosixPath:
|
|
52
|
+
"""Reject absolute paths, drive prefixes, and '..' traversal segments."""
|
|
53
|
+
clean = logical_path
|
|
54
|
+
if clean.startswith("res://"):
|
|
55
|
+
clean = clean[len("res://") :]
|
|
56
|
+
clean = clean.replace("\\", "/").lstrip("/")
|
|
57
|
+
if not clean or ":" in clean.split("/")[0]:
|
|
58
|
+
raise ValueError(f"Unsafe or empty logical path: {logical_path!r}")
|
|
59
|
+
rel = PurePosixPath(clean)
|
|
60
|
+
if rel.is_absolute() or ".." in rel.parts:
|
|
61
|
+
raise ValueError(f"Path traversal rejected: {logical_path!r}")
|
|
62
|
+
return rel
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
def inspect_pck(pck_path: Path) -> tuple[PckHeader, list[PckEntry]]:
|
|
66
|
+
"""Read only the header and directory table of a Godot PCK v2/v3/v4 file."""
|
|
67
|
+
pck_path = Path(pck_path).resolve(strict=True)
|
|
68
|
+
file_size = pck_path.stat().st_size
|
|
69
|
+
if file_size < 100:
|
|
70
|
+
raise ValueError(f"File too small to be a valid Godot PCK: {file_size} bytes")
|
|
71
|
+
|
|
72
|
+
with pck_path.open("rb") as stream:
|
|
73
|
+
hdr = stream.read(128)
|
|
74
|
+
if hdr[:4] != PCK_MAGIC:
|
|
75
|
+
raise ValueError(f"Invalid PCK magic: {hdr[:4]!r} (expected {PCK_MAGIC!r})")
|
|
76
|
+
|
|
77
|
+
fmt_ver, maj, min_, patch, flags = struct.unpack("<IIIII", hdr[4:24])
|
|
78
|
+
dir_encrypted = bool(flags & FLAG_DIR_ENCRYPTED)
|
|
79
|
+
if dir_encrypted:
|
|
80
|
+
raise ValueError("PCK directory is encrypted; refusing to decrypt or bypass.")
|
|
81
|
+
|
|
82
|
+
if fmt_ver == 2:
|
|
83
|
+
file_base = struct.unpack("<Q", hdr[24:32])[0]
|
|
84
|
+
dir_offset = 96
|
|
85
|
+
elif fmt_ver >= 3:
|
|
86
|
+
file_base, dir_offset = struct.unpack("<QQ", hdr[24:40])
|
|
87
|
+
if dir_offset == 0 or dir_offset >= file_size:
|
|
88
|
+
dir_offset = 104
|
|
89
|
+
else:
|
|
90
|
+
raise ValueError(f"Unsupported PCK format version: {fmt_ver}")
|
|
91
|
+
|
|
92
|
+
stream.seek(dir_offset)
|
|
93
|
+
raw_count = stream.read(4)
|
|
94
|
+
if len(raw_count) < 4:
|
|
95
|
+
raise ValueError("Unexpected EOF reading PCK file_count")
|
|
96
|
+
file_count = struct.unpack("<I", raw_count)[0]
|
|
97
|
+
|
|
98
|
+
entries: list[PckEntry] = []
|
|
99
|
+
for idx in range(file_count):
|
|
100
|
+
raw_slen = stream.read(4)
|
|
101
|
+
if len(raw_slen) < 4:
|
|
102
|
+
raise ValueError(f"Unexpected EOF at entry {idx}")
|
|
103
|
+
slen = struct.unpack("<I", raw_slen)[0]
|
|
104
|
+
if slen == 0 or slen > 4096:
|
|
105
|
+
raise ValueError(f"Invalid path length {slen} at entry {idx}")
|
|
106
|
+
raw_path = stream.read(slen)
|
|
107
|
+
if len(raw_path) < slen:
|
|
108
|
+
raise ValueError(f"Unexpected EOF reading path at entry {idx}")
|
|
109
|
+
path = raw_path.rstrip(b"\x00").decode("utf-8", errors="replace")
|
|
110
|
+
|
|
111
|
+
meta = stream.read(36)
|
|
112
|
+
if len(meta) < 36:
|
|
113
|
+
raise ValueError(f"Unexpected EOF reading metadata at entry {idx}")
|
|
114
|
+
rel_off, size = struct.unpack("<QQ", meta[:16])
|
|
115
|
+
md5_hex = meta[16:32].hex()
|
|
116
|
+
eflags = struct.unpack("<I", meta[32:36])[0]
|
|
117
|
+
abs_off = (file_base + rel_off) if (flags & FLAG_REL_FILEBASE or fmt_ver >= 2) else rel_off
|
|
118
|
+
if abs_off + size > file_size:
|
|
119
|
+
raise ValueError(f"Entry {path!r} exceeds PCK size ({abs_off}+{size} > {file_size})")
|
|
120
|
+
|
|
121
|
+
entries.append(
|
|
122
|
+
PckEntry(
|
|
123
|
+
path=path,
|
|
124
|
+
offset=abs_off,
|
|
125
|
+
size=size,
|
|
126
|
+
md5=md5_hex,
|
|
127
|
+
flags=eflags,
|
|
128
|
+
encrypted=bool(eflags & ENTRY_FLAG_ENCRYPTED),
|
|
129
|
+
)
|
|
130
|
+
)
|
|
131
|
+
|
|
132
|
+
header = PckHeader(
|
|
133
|
+
format_version=fmt_ver,
|
|
134
|
+
engine_major=maj,
|
|
135
|
+
engine_minor=min_,
|
|
136
|
+
engine_patch=patch,
|
|
137
|
+
flags=flags,
|
|
138
|
+
dir_encrypted=dir_encrypted,
|
|
139
|
+
file_base=file_base,
|
|
140
|
+
dir_offset=dir_offset,
|
|
141
|
+
file_size=file_size,
|
|
142
|
+
file_count=len(entries),
|
|
143
|
+
)
|
|
144
|
+
return header, entries
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
def summarize_pck(pck_path: Path) -> dict[str, Any]:
|
|
148
|
+
"""Build a JSON-serializable audit summary without extracting any files."""
|
|
149
|
+
header, entries = inspect_pck(pck_path)
|
|
150
|
+
ext_counts: Counter[str] = Counter()
|
|
151
|
+
ext_bytes: Counter[str] = Counter()
|
|
152
|
+
dir_counts: Counter[str] = Counter()
|
|
153
|
+
dir_bytes: Counter[str] = Counter()
|
|
154
|
+
encrypted_count = 0
|
|
155
|
+
|
|
156
|
+
for e in entries:
|
|
157
|
+
if e.encrypted:
|
|
158
|
+
encrypted_count += 1
|
|
159
|
+
clean = e.path[6:] if e.path.startswith("res://") else e.path
|
|
160
|
+
parts = clean.split("/")
|
|
161
|
+
top = parts[0] if len(parts) > 1 else "<root>"
|
|
162
|
+
ext = os.path.splitext(clean)[1].lower() or "<noext>"
|
|
163
|
+
ext_counts[ext] += 1
|
|
164
|
+
ext_bytes[ext] += e.size
|
|
165
|
+
dir_counts[top] += 1
|
|
166
|
+
dir_bytes[top] += e.size
|
|
167
|
+
|
|
168
|
+
return {
|
|
169
|
+
"pck": str(Path(pck_path).resolve()),
|
|
170
|
+
"header": asdict(header),
|
|
171
|
+
"encrypted_entries": encrypted_count,
|
|
172
|
+
"extensions": [
|
|
173
|
+
{"ext": ext, "count": cnt, "bytes": ext_bytes[ext]}
|
|
174
|
+
for ext, cnt in ext_counts.most_common()
|
|
175
|
+
],
|
|
176
|
+
"top_directories": [
|
|
177
|
+
{"dir": d, "count": cnt, "bytes": dir_bytes[d]}
|
|
178
|
+
for d, cnt in dir_counts.most_common()
|
|
179
|
+
],
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
def read_entry_bytes(pck_path: Path, logical_path: str, max_bytes: int = 32 * 1024 * 1024) -> tuple[bytes, str]:
|
|
184
|
+
"""Read one unencrypted entry into memory with a size cap and return (bytes, sha256)."""
|
|
185
|
+
_, entries = inspect_pck(pck_path)
|
|
186
|
+
target = logical_path[6:] if logical_path.startswith("res://") else logical_path
|
|
187
|
+
match = next((e for e in entries if e.path == logical_path or e.path == target or e.path == f"res://{target}"), None)
|
|
188
|
+
if match is None:
|
|
189
|
+
raise KeyError(f"Entry not found in PCK: {logical_path!r}")
|
|
190
|
+
if match.encrypted:
|
|
191
|
+
raise ValueError(f"Entry is encrypted: {logical_path!r}")
|
|
192
|
+
if match.size > max_bytes:
|
|
193
|
+
raise ValueError(f"Entry size {match.size} exceeds max_bytes budget {max_bytes}")
|
|
194
|
+
|
|
195
|
+
with Path(pck_path).open("rb") as stream:
|
|
196
|
+
stream.seek(match.offset)
|
|
197
|
+
data = stream.read(match.size)
|
|
198
|
+
return data, hashlib.sha256(data).hexdigest()
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
def extract_entries(
|
|
202
|
+
pck_path: Path,
|
|
203
|
+
logical_paths: list[str],
|
|
204
|
+
output_dir: Path,
|
|
205
|
+
max_total_bytes: int = 64 * 1024 * 1024,
|
|
206
|
+
) -> list[dict[str, Any]]:
|
|
207
|
+
"""Selectively extract specific entries under a strict byte budget and path guard."""
|
|
208
|
+
_, entries = inspect_pck(pck_path)
|
|
209
|
+
by_clean = {(e.path[6:] if e.path.startswith("res://") else e.path): e for e in entries}
|
|
210
|
+
|
|
211
|
+
selected: list[tuple[PckEntry, PurePosixPath]] = []
|
|
212
|
+
total_bytes = 0
|
|
213
|
+
for req in logical_paths:
|
|
214
|
+
rel = _sanitize_rel_path(req)
|
|
215
|
+
key = rel.as_posix()
|
|
216
|
+
entry = by_clean.get(key)
|
|
217
|
+
if entry is None:
|
|
218
|
+
raise KeyError(f"Entry not found in PCK: {req!r}")
|
|
219
|
+
if entry.encrypted:
|
|
220
|
+
raise ValueError(f"Refusing to extract encrypted entry: {req!r}")
|
|
221
|
+
total_bytes += entry.size
|
|
222
|
+
if total_bytes > max_total_bytes:
|
|
223
|
+
raise ValueError(f"Total extraction size {total_bytes} exceeds budget {max_total_bytes}")
|
|
224
|
+
selected.append((entry, rel))
|
|
225
|
+
|
|
226
|
+
out_root = Path(output_dir).resolve()
|
|
227
|
+
out_root.mkdir(parents=True, exist_ok=True)
|
|
228
|
+
receipts: list[dict[str, Any]] = []
|
|
229
|
+
|
|
230
|
+
with Path(pck_path).open("rb") as stream:
|
|
231
|
+
for entry, rel in selected:
|
|
232
|
+
dest = (out_root / Path(*rel.parts)).resolve()
|
|
233
|
+
if not dest.is_relative_to(out_root):
|
|
234
|
+
raise ValueError(f"Resolved output escapes output_dir: {dest}")
|
|
235
|
+
dest.parent.mkdir(parents=True, exist_ok=True)
|
|
236
|
+
stream.seek(entry.offset)
|
|
237
|
+
data = stream.read(entry.size)
|
|
238
|
+
dest.write_bytes(data)
|
|
239
|
+
receipts.append(
|
|
240
|
+
{
|
|
241
|
+
"logical_path": entry.path,
|
|
242
|
+
"output_path": str(dest),
|
|
243
|
+
"bytes": len(data),
|
|
244
|
+
"sha256": hashlib.sha256(data).hexdigest(),
|
|
245
|
+
}
|
|
246
|
+
)
|
|
247
|
+
return receipts
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
def main(argv: list[str] | None = None) -> int:
|
|
251
|
+
parser = argparse.ArgumentParser(description=__doc__)
|
|
252
|
+
sub = parser.add_subparsers(dest="command", required=True)
|
|
253
|
+
|
|
254
|
+
p_sum = sub.add_parser("summary", help="Print JSON summary of a Godot PCK")
|
|
255
|
+
p_sum.add_argument("pck", type=Path)
|
|
256
|
+
|
|
257
|
+
p_ls = sub.add_parser("list", help="List entry paths matching an optional prefix or suffix")
|
|
258
|
+
p_ls.add_argument("pck", type=Path)
|
|
259
|
+
p_ls.add_argument("--prefix", default="")
|
|
260
|
+
p_ls.add_argument("--suffix", default="")
|
|
261
|
+
|
|
262
|
+
p_ext = sub.add_parser("extract", help="Selectively extract entries under a byte budget")
|
|
263
|
+
p_ext.add_argument("pck", type=Path)
|
|
264
|
+
p_ext.add_argument("--out", type=Path, required=True)
|
|
265
|
+
p_ext.add_argument("--max-mib", type=int, default=64)
|
|
266
|
+
p_ext.add_argument("paths", nargs="+")
|
|
267
|
+
|
|
268
|
+
args = parser.parse_args(argv)
|
|
269
|
+
try:
|
|
270
|
+
if args.command == "summary":
|
|
271
|
+
print(json.dumps(summarize_pck(args.pck), ensure_ascii=False, indent=2))
|
|
272
|
+
return 0
|
|
273
|
+
if args.command == "list":
|
|
274
|
+
_, entries = inspect_pck(args.pck)
|
|
275
|
+
rows = [
|
|
276
|
+
{"path": e.path, "size": e.size, "encrypted": e.encrypted}
|
|
277
|
+
for e in entries
|
|
278
|
+
if e.path.startswith(args.prefix) and e.path.endswith(args.suffix)
|
|
279
|
+
]
|
|
280
|
+
print(json.dumps({"count": len(rows), "entries": rows}, ensure_ascii=False, indent=2))
|
|
281
|
+
return 0
|
|
282
|
+
if args.command == "extract":
|
|
283
|
+
receipts = extract_entries(args.pck, args.paths, args.out, args.max_mib * 1024 * 1024)
|
|
284
|
+
print(json.dumps({"extracted": receipts}, ensure_ascii=False, indent=2))
|
|
285
|
+
return 0
|
|
286
|
+
except (OSError, ValueError, KeyError) as exc:
|
|
287
|
+
print(json.dumps({"status": "ERROR", "error": str(exc)}, ensure_ascii=False), file=sys.stderr)
|
|
288
|
+
return 1
|
|
289
|
+
return 1
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
if __name__ == "__main__":
|
|
293
|
+
raise SystemExit(main())
|
ueagentdevkit-0.3.0/Tools/Capture/ViewportCapture/Source/ViewportCapture/Private/ViewportFrames.cpp
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
#include "ViewportFrames.h"
|
|
2
|
+
#include "Algo/AllOf.h"
|
|
3
|
+
#include "Engine/GameViewportClient.h"
|
|
4
|
+
#include "Engine/World.h"
|
|
5
|
+
#include "FrameGrabber.h"
|
|
6
|
+
#include "HAL/FileManager.h"
|
|
7
|
+
#include "Misc/FileHelper.h"
|
|
8
|
+
#include "Misc/Paths.h"
|
|
9
|
+
#include "Modules/ModuleManager.h"
|
|
10
|
+
#include "Widgets/SViewport.h"
|
|
11
|
+
IMPLEMENT_MODULE(FDefaultModuleImpl, ViewportCapture)
|
|
12
|
+
namespace
|
|
13
|
+
{
|
|
14
|
+
struct FStamp : IFramePayload
|
|
15
|
+
{
|
|
16
|
+
double Time;
|
|
17
|
+
uint64 Frame;
|
|
18
|
+
};
|
|
19
|
+
TUniquePtr<FFrameGrabber> Grab;
|
|
20
|
+
TUniquePtr<FArchive> Raw;
|
|
21
|
+
FString GCaptureIndexText, Folder;
|
|
22
|
+
void Drain()
|
|
23
|
+
{
|
|
24
|
+
for (auto &Frame : Grab->GetCapturedFrames())
|
|
25
|
+
{
|
|
26
|
+
auto *Stamp = Frame.GetPayload<FStamp>();
|
|
27
|
+
if (!Stamp || Frame.ColorBuffer.IsEmpty())
|
|
28
|
+
continue;
|
|
29
|
+
Raw->Serialize(Frame.ColorBuffer.GetData(), Frame.ColorBuffer.Num() * sizeof(FColor));
|
|
30
|
+
GCaptureIndexText += FString::Printf(TEXT("%.6f,%llu,%d,%d\n"), Stamp->Time, Stamp->Frame,
|
|
31
|
+
Frame.BufferSize.X, Frame.BufferSize.Y);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
} // namespace
|
|
35
|
+
bool UViewportFrames::BeginFrames(UWorld *World, FString Run)
|
|
36
|
+
{
|
|
37
|
+
if (Grab || !World || World->WorldType != EWorldType::PIE ||
|
|
38
|
+
(Run.IsEmpty() || Run.Len() > 32 ||
|
|
39
|
+
!Algo::AllOf(Run, [](TCHAR C) { return C >= TEXT('0') && C <= TEXT('9'); })))
|
|
40
|
+
return false;
|
|
41
|
+
auto *Client = World->GetGameViewport();
|
|
42
|
+
if (!Client || !Client->GetGameViewportWidget().IsValid())
|
|
43
|
+
return false;
|
|
44
|
+
auto View = StaticCastSharedPtr<FSceneViewport>(Client->GetGameViewportWidget()->GetViewportInterface().Pin());
|
|
45
|
+
if (!View.IsValid() || View.Get() != Client->GetGameViewport())
|
|
46
|
+
return false;
|
|
47
|
+
Folder = FPaths::ProjectSavedDir() / TEXT("LiveCapture") / Run;
|
|
48
|
+
IFileManager::Get().MakeDirectory(*Folder, true);
|
|
49
|
+
Raw.Reset(IFileManager::Get().CreateFileWriter(*(Folder / TEXT("video.bgra"))));
|
|
50
|
+
if (!Raw)
|
|
51
|
+
return false;
|
|
52
|
+
GCaptureIndexText = TEXT("time,engine_frame,width,height\n");
|
|
53
|
+
Grab = MakeUnique<FFrameGrabber>(View.ToSharedRef(), View->GetSizeXY());
|
|
54
|
+
Grab->StartCapturingFrames();
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
void UViewportFrames::TakeFrame(double WallTime)
|
|
58
|
+
{
|
|
59
|
+
if (!Grab)
|
|
60
|
+
return;
|
|
61
|
+
Drain();
|
|
62
|
+
auto Stamp = MakeShared<FStamp, ESPMode::ThreadSafe>();
|
|
63
|
+
Stamp->Time = WallTime;
|
|
64
|
+
Stamp->Frame = GFrameCounter;
|
|
65
|
+
Grab->CaptureThisFrame(Stamp);
|
|
66
|
+
}
|
|
67
|
+
void UViewportFrames::FinishFrames()
|
|
68
|
+
{
|
|
69
|
+
if (!Grab)
|
|
70
|
+
return;
|
|
71
|
+
Grab->StopCapturingFrames();
|
|
72
|
+
Grab->Shutdown();
|
|
73
|
+
Drain();
|
|
74
|
+
Grab.Reset();
|
|
75
|
+
Raw.Reset();
|
|
76
|
+
FFileHelper::SaveStringToFile(GCaptureIndexText, *(Folder / TEXT("frames.csv")),
|
|
77
|
+
FFileHelper::EEncodingOptions::ForceUTF8WithoutBOM);
|
|
78
|
+
}
|
ueagentdevkit-0.3.0/Tools/Capture/ViewportCapture/Source/ViewportCapture/Public/ViewportFrames.h
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
#include "Kismet/BlueprintFunctionLibrary.h"
|
|
3
|
+
#include "ViewportFrames.generated.h"
|
|
4
|
+
UCLASS()
|
|
5
|
+
class UViewportFrames : public UBlueprintFunctionLibrary
|
|
6
|
+
{
|
|
7
|
+
GENERATED_BODY()
|
|
8
|
+
public:
|
|
9
|
+
UFUNCTION(BlueprintCallable, Category = "Test") static bool BeginFrames(UWorld *World, FString Run);
|
|
10
|
+
UFUNCTION(BlueprintCallable, Category = "Test") static void TakeFrame(double WallTime);
|
|
11
|
+
UFUNCTION(BlueprintCallable, Category = "Test") static void FinishFrames();
|
|
12
|
+
};
|
ueagentdevkit-0.3.0/Tools/Capture/ViewportCapture/Source/ViewportCapture/ViewportCapture.Build.cs
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
using UnrealBuildTool;
|
|
2
|
+
public class ViewportCapture : ModuleRules {
|
|
3
|
+
public ViewportCapture(ReadOnlyTargetRules Target) : base(Target) {
|
|
4
|
+
PrivateDependencyModuleNames.AddRange(new[]{"Core","CoreUObject","Engine","Slate","SlateCore","MovieSceneCapture","RHI","RenderCore"});
|
|
5
|
+
}
|
|
6
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"FileVersion":3,"Version":1,"VersionName":"1","FriendlyName":"ViewportCapture","Modules":[{"Name":"ViewportCapture","Type":"Editor","LoadingPhase":"Default"}]}
|