unreal-python
Unified guide for Unreal Editor Python scripting, API search from unreal.py stubs, visual verification, remote execution, diagnostics, and VS Code debugpy setup. Use when writing UE Python scripts, querying Python API availability, or validating editor automation.
- License 许可
- MIT
- 最近更新
- 2026-11-12
- Stars
- ★ 3
- Forks
- 1
01 前言 Front Matter
- name
- unreal-python
- description
- Unified guide for Unreal Editor Python scripting, API search from unreal.py stubs, visual verification, remote execution, diagnostics, and VS Code debugpy setup. Use when writing UE Python scripts, querying Python API availability, or validating editor automation.
02 资源文件 45
- 资产文件assets/vscode-launch-template.json820 B
- 资产文件assets/vscode-tasks-template.json1.8 KB
- 脚本examples/add_gameplaytag_to_asset.py6.3 KB
- 脚本examples/create_dark_pyramid_level.py11.3 KB
- 脚本examples/create_footwork_blendspace.py4.6 KB
- 脚本examples/create_punching_bag_blueprint.py11.5 KB
- 脚本examples/create_sky_level.py6.2 KB
- 脚本examples/pie_screenshot_capturer.py15.3 KB
- 其他plugin/ExtraPythonAPIs/ExtraPythonAPIs.uplugin614 B
- 其他plugin/ExtraPythonAPIs/Source/ExtraPythonAPIs/ExtraPythonAPIs.Build.cs439 B
- 其他plugin/ExtraPythonAPIs/Source/ExtraPythonAPIs/Private/ExBlueprintComponentLibrary.cpp2.2 KB
- 其他plugin/ExtraPythonAPIs/Source/ExtraPythonAPIs/Private/ExtraPythonAPIsModule.cpp464 B
- 其他plugin/ExtraPythonAPIs/Source/ExtraPythonAPIs/Public/ExBlueprintComponentLibrary.h2.4 KB
- 其他plugin/ExtraPythonAPIs/Source/ExtraPythonAPIs/Public/ExtraPythonAPIsModule.h316 B
- 参考文档references/api-search.md3.5 KB
- 参考文档references/asset-diagnostic.md7.9 KB
- 参考文档references/best-practices.md4.3 KB
- 参考文档references/capture-scripts.md10.2 KB
- 参考文档references/common-pitfals/cable-component.md3.2 KB
- 参考文档references/common-pitfals/rotator.md214 B
- 参考文档references/cpp-source-investigation.md2.7 KB
- 参考文档references/editor-capture.md9.1 KB
- 参考文档references/extra-python-apis.md1.4 KB
- 参考文档references/vscode-debugger.md3.5 KB
- 脚本scripts/api-search.py67.6 KB
- 脚本scripts/asset-diagnostic.py3.6 KB
- 脚本scripts/install_extra_python_apis_plugin.py4.6 KB
- 脚本scripts/orbital-capture.py8.0 KB
- 脚本scripts/pie-capture.py7.9 KB
- 脚本scripts/remote-execute.py17.1 KB
- 脚本scripts/setup-vscode.py10.0 KB
- 脚本scripts/start_debug_server.py2.7 KB
- 脚本scripts/window-capture.py8.7 KB
- 脚本site-packages/asset_diagnostic/__init__.py1.6 KB
- 脚本site-packages/asset_diagnostic/__main__.py5.1 KB
- 脚本site-packages/asset_diagnostic/core.py11.3 KB
- 脚本site-packages/asset_diagnostic/diagnostics/__init__.py2.1 KB
- 脚本site-packages/asset_diagnostic/diagnostics/base.py4.2 KB
- 脚本site-packages/asset_diagnostic/diagnostics/level.py35.4 KB
- 脚本site-packages/asset_diagnostic/utils.py13.8 KB
- 脚本site-packages/editor_capture/__init__.py3.6 KB
- 脚本site-packages/editor_capture/asset_editor.py6.0 KB
- 脚本site-packages/editor_capture/orbital.py23.9 KB
- 脚本site-packages/editor_capture/pie_capture.py18.2 KB
- 脚本site-packages/editor_capture/window_capture.py15.6 KB
03 SKILL.md 正文
Unreal Python Skill
Context
- Repository rules:
AGENTS.md - Related skills: Editor workflows, UEEditorMCP, C++, Blueprint/Widget, Material, Niagara
Use this skill for Unreal Editor Python scripts, automation probes, API discovery, asset diagnostics, screenshots, PIE capture, or VS Code debugging.
Local Structure
unreal-python/
scripts/ CLI tools: api-search, remote-execute, setup-vscode, capture, diagnostics
lib/ reusable Python libraries
references/ detailed docs loaded on demand
examples/ small task examples
assets/ VS Code launch/task templates
plugin/ optional ExtraPythonAPIs plugin
Workflow
- Clarify only blocking requirements; otherwise infer a minimal script and validate it.
- Search existing project scripts and examples before writing new helpers.
- Verify API availability with
scripts/api-search.pyagainstIntermediate/PythonStub/unreal.py. - For API gaps or ambiguous behavior, read references/cpp-source-investigation.md.
- Prefer an existing typed Action or official Toolset over Python. Use Python only when discovery proves a capability gap or the task is explicitly Python authoring.
- Implement one focused script or probe at a time.
- Execute through a currently discovered Python-capable Action/Toolset, or use
scripts/remote-execute.pywhen its bridge prerequisites are verified. Do not assume aneditor.executeAction exists. - Validate with diagnostics and screenshots/PIE capture when the change has visual or runtime impact.
Transactions And Asset Safety
Any script that mutates assets should use an editor transaction and explicit dirty/save behavior:
with unreal.ScopedEditorTransaction("Describe the edit"):
asset.modify()
asset.set_editor_property("PropertyName", value)
Validate asset paths, world context, selected objects, and package writability before mutation. Do not save levels or assets unless the task calls for it or validation requires it.
API Search
Use references/api-search.md for full usage.
python scripts/api-search.py actor
python scripts/api-search.py unreal.Actor.on_destroyed
python scripts/api-search.py unreal.Actor.*location*
python scripts/api-search.py -c widget
python scripts/api-search.py -m collision
The tool auto-detects Intermediate/PythonStub/unreal.py; pass --input only when needed.
Visual Verification
Use the capture tools only when the task needs visual proof:
| Scenario | Tool |
|---|---|
| Static scene or level setup | scripts/orbital-capture.py |
| Blueprint/asset editor view | scripts/window-capture.py |
| Runtime/PIE behavior | scripts/pie-capture.py |
| Asset health check | scripts/asset-diagnostic.py |
Read references/capture-scripts.md and references/editor-capture.md only when using those tools.
VS Code Debugging
Use references/vscode-debugger.md when setting up or using F5 debugging.
python scripts/setup-vscode.py
python scripts/remote-execute.py --file scripts/start_debug_server.py
Then attach with the generated debug configuration.
References
- Best Practices
- Common Pitfalls
- Capture Scripts
- Editor Capture API
- Asset Diagnostic
- ExtraPythonAPIs Plugin
- C++ Source Investigation
- API Search
- VS Code Debugger
Delivery
Report script path, execution method, validation artifacts, assets touched/saved, and any API limitation or manual editor step left.
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.