【问题标题】:How to Generate Visual Studio Project Files from Unreal Engine .uproject file with a batch file?如何使用批处理文件从 Unreal Engine .uproject 文件生成 Visual Studio 项目文件?
【发布时间】:2021-12-12 06:30:21
【问题描述】:

我有一个如下的批处理文件来清理我的 UE 项目。

del *.sln
rmdir /s /q .vs
rmdir /s /q Binaries
rmdir /s /q Intermediate
rmdir /s /q Saved
rmdir /s /q DerivedDataCache
"C:\Program Files (x86)\Epic Games\Launcher\Engine\Binaries\Win64\UnrealVersionSelector.exe" /projectfiles Attaching.uproject

不幸的是,当我运行批处理时,我收到如下错误:

我通过逆向工程找到了批处理中的最后一条命令,如下所示:

问题

从批处理文件生成 Visual Studio 项目文件的正确方法是什么?

【问题讨论】:

    标签: batch-file unreal-engine4 unreal-development-kit


    【解决方案1】:

    在浪费了很多时间之后,我找到了解决方案。我们必须完全限定项目路径。

    echo off
    
    del *.sln
    rmdir /s /q .vs
    rmdir /s /q Binaries
    rmdir /s /q Intermediate
    rem rmdir /s /q Saved
    rmdir /s /q DerivedDataCache
    
    
    set MyUVS="C:\Program Files (x86)\Epic Games\Launcher\Engine\Binaries\Win64\UnrealVersionSelector.exe"
    set MyUBT="f:\Program Files\Epic Games\UE_4.26\Engine\Binaries\DotNET\UnrealBuildTool.exe"
    
    rem change Transformation to your own project name
    set MyFullPath="%cd%\Transformation"
    
    
    %MyUVS% /projectfiles %MyFullPath%.uproject
    
    %MyUBT% Development Win64 -Project=%MyFullPath%.uproject -TargetType=Editor -Progress -NoEngineChanges -NoHotReloadFromIDE
    
    %MyFullPath%.uproject
    
    %MyFullPath%.sln
    

    我希望这个答案对以后的其他人也有用!

    【讨论】:

      猜你喜欢
      • 2016-12-15
      • 1970-01-01
      • 1970-01-01
      • 2017-05-18
      • 2010-09-28
      • 2023-02-05
      • 2017-07-24
      • 2016-06-06
      • 1970-01-01
      相关资源
      最近更新 更多