Unreal source index

From OrionUE/Orion_FreeEdition · View interactive version

Unreal source index is an AI agent skill from the GitHub repository OrionUE/Orion_FreeEdition. Use when Codex needs to generate, refresh, or query a portable Unreal Engine source index before broad engine searches: Engine/Source modules, Engine/Plugins descriptors, plugin modules, Build.cs files, uplugin files, module ownership, source roots, public/private/classes folders, runtime/editor mod

How to use this skill

Skill file

Unreal Source Index

本 Skill 用于快速定位 Unreal Engine 源码里的模块、插件、Build.cs、.uplugin 和 source root。它是 unreal-source-code-navigator 的前置加速器:先用索引缩小搜索范围,再打开本机真实源码确认声明、依赖和调用样例。

详细说明:

references/source-index.zh-CN.md

工作流

  1. 先识别 <EngineRoot>。如果已有 unreal-source-code-navigator 上下文,沿用它发现的 engine root。
  2. 如果没有索引或索引可能过期,运行 scripts/generate_unreal_source_index.py 生成当前机器的相对路径索引;默认缓存到 <ProjectRoot>/Saved/OrionUE/UnrealEngine/SourceIndex。
  3. 用 scripts/query_unreal_source_index.py 或 rg 查询 module/plugin/API 关键词,定位 Build.cs、.uplugin 或 source root。
  4. 把匹配到的 relative_* 路径与当前 <EngineRoot> 拼接,再打开真实源码。
  5. 如果进入具体子系统实现,路由到对应 Skill;如果只是查声明和调用点,回到 ../unreal-source-code-navigator/SKILL.md。

脚本

python scripts/generate_unreal_source_index.py --engine-root <EngineRoot>
python scripts/query_unreal_source_index.py EnhancedInput
python scripts/query_unreal_source_index.py ReplicationGraph --kind all

如果未传 --engine-root,生成脚本会先读取 <ProjectRoot>/Saved/OrionUE/UnrealEngine/InstallDirectory.txt,再尝试读取 UE_ENGINE_ROOT、UNREAL_ENGINE_ROOT 或 UE_ROOT。

如果未传 --out,默认写入 <ProjectRoot>/Saved/OrionUE/UnrealEngine/SourceIndex。生成结果只使用 Engine/... 相对路径,不写入本机绝对路径。

路由

约束

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.