Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattetti/fcb90883dea6f19fe1a6d022fb529415 to your computer and use it in GitHub Desktop.
Save mattetti/fcb90883dea6f19fe1a6d022fb529415 to your computer and use it in GitHub Desktop.
RegenProjectFiles.bat
@echo off
rem Check if the UE_ENGINE_PATH environment variable is set
if not defined UE_ENGINE_PATH (
echo Error: UE_ENGINE_PATH environment variable is not set.
echo Please set the UE_ENGINE_PATH variable to the Unreal Engine installation path.
echo Example: setx UE_ENGINE_PATH "E:\Epic Games\UnrealEngine\Engine"
pause
exit /b 1
)
echo Unreal Engine Path: "%UE_ENGINE_PATH%"
rem Change directory to the project directory
cd "%~dp0"
rem Find the first .uproject file in the directory
for /R %%i in (*.uproject) do (
set "UPROJECT=%%i"
goto :build
)
:build
echo Found .uproject file: %UPROJECT%
echo Current directory: %cd%
rem Run UnrealBuildTool to generate project files
"%UE_ENGINE_PATH%\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.exe" -projectfiles -project="%UPROJECT%" -game -rocket -progress
rem Pause to keep the window open
pause
exit /b 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment