跳转至

Visual Studio 编译 UE C++ 工程配置(Development Editor + Rebuild 项目)

C++ 工程编译出错(如 Shader/Editor 模块编译失败)时,在 Visual Studio 里用正确的目标配置完整重编一遍工程。

步骤

  1. 清理工程的中间文件:删除 Intermediate/、.vs/(如果有),Saved/ 可删可不删。
  2. 重新生成工程文件:右键 .uproject → Generate Visual Studio project files。
  3. 在 VS 里一定要编译 Editor 目标。打开 .sln 后,在顶部工具栏选择:
    • Configuration:Development Editor
    • Platform:Win64
  4. 然后在解决方案资源管理器中右键 Games 下的游戏项目 → Rebuild(已删过 Intermediate/ 时直接 Build 就是全量重编,效果相同)。
    • 注意:源码编译版引擎切勿 Rebuild Solution,那会把整个引擎一起重编(数小时);重编游戏项目本身即可。
  5. 编译结束后,项目目录里应当出现(很关键):项目名/Binaries/Win64/UnrealEditor-项目名.dll。

Visual Studio 中选择 Development Editor 配置(红框处下拉菜单)

ID:89 | 更新:2026-07-06