Unreal Engine 5.2: 无法创建或打开C++项目

huangapple go评论154阅读模式
英文:

Unreal Engine 5.2: Can't create or open C++ project

问题

我最近升级到了Unreal Engine 5.2,但无法创建新的C++项目。它给我显示了这个错误:

运行E:/!Unreal/UE_5.2/Engine/Build/BatchFiles/Build.bat -projectfiles -project="D:/!Unreal/MyProject/MyProject.uproject" -game -rocket -progress
错误: 似乎未将批处理文件放置在Engine/Build/BatchFiles目录中。此脚本必须从该目录内运行。

当我尝试创建蓝图项目时,它可以正常工作。如果我尝试打开一个已存在的UE5.2项目(该项目不是在我的计算机上创建的,而是从GitHub上拉取的),我会收到重新构建丢失模块的消息,但然后会出现项目无法编译并要求从源代码构建的错误。当我尝试生成VS项目文件时,我会得到前面的错误:

运行E:/!Unreal/UE_5.2/Engine/Build/BatchFiles/Build.bat -projectfiles -project=“E:/!UnrealProjects/Space-Innovators/SpaceInnovators.uproject” -game -rocket -progress -log=“E:!UnrealProjects\Space-Innovators/Saved/Logs/UnrealVersionSelector-2023.08.04-21.19.45.log”
错误: 似乎未将批处理文件放置在Engine/Build/BatchFiles目录中。此脚本必须从该目录内运行。

我尝试过但没有成功的方法包括:

重新安装Unreal Engine,重新安装VS,重新拉取项目,将项目目录移动到安装Unreal Engine的磁盘上(它们位于不同的磁盘上,仍然没有效果),重启计算机。

英文:

I recently updated to Unreal Engine 5.2 and I can't create a new C++ project. It gives me this error:

Running E:/!Unreal/UE_5.2/Engine/Build/BatchFiles/Build.bat -projectfiles -project="D:/!Unreal/MyProject/MyProject.uproject" -game -rocket -progress
ERROR: The batch file does not appear to be located in the Engine/Build/BatchFiles directory. This script must be run from within that directory.

It works just fine when I try to create a blueprint project. If I try to open an already existing UE5.2 project (which wasn't created on my computer and instead pulled from github), I get the message to rebuild the missing modules, but then get an error that the project could not be compiled and to build it from source. When I try to generate VS project files I get the previous error:

Running E:/!Unreal/UE_5.2/Engine/Build/BatchFiles/Build.bat -projectfiles -project=“E:/!UnrealProjects/Space-Innovators/SpaceInnovators.uproject” -game -rocket -progress -log=“E:!UnrealProjects\Space-Innovators/Saved/Logs/UnrealVersionSelector-2023.08.04-21.19.45.log”
ERROR: The batch file does not appear to be located in the Engine/Build/BatchFiles directory. This script must be run from within that directory.

Things I have tried that didn't work:

reinstalling Unreal Engine, reinstalling VS, pulling the project again, moving the project directory to the disk where Unreal Engine is installed (they were on different disks, still nothing), restarting my computer

答案1

得分: 1

我自己解决了,问题出在Unreal Engine目录,因为它以"!"开头。我之前都是在这个目录安装了其他版本,从未遇到过这样的问题。

英文:

Solved it myself, the problem was comming from the Unreal Engine directory because it begins with "!". I've installed all my other versions in this directory, never had such problem before.

huangapple
  • 本文由 发表于 2023年8月5日 16:34:28
  • 转载请务必保留本文链接:https://go.coder-hub.com/76840781.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定