Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save superwills/7510d8330b85efd9fde51650401b6e63 to your computer and use it in GitHub Desktop.

Select an option

Save superwills/7510d8330b85efd9fde51650401b6e63 to your computer and use it in GitHub Desktop.
UE5 build and cook .bat files
:: Put these files the root of your UE5 project, and adjust path of Game\Game.uproject appropriately
::
:: COOK.bat
call .\Engine\Build\BatchFiles\RunUAT.bat BuildCookRun -project=".\Game\Game.uproject" -targetplatform=Win64 -clientconfig=Development -nop4 -build -cook -stage -iostore -compressed -pak -prereqs -utf8output
:: Or, sometimes I do it like this
call .\Engine\Build\BatchFiles\RunUAT.bat BuildCookRun -project=".\Game\Game.uproject" -targetplatform=%~1 -clientconfig=%~2 -nop4 -build -cook -stage -iostore -compressed -pak -prereqs -utf8output
:: So you use it like:
:: Cook.bat Win64 Test
:: Cook.bat Win64 Development
::
:: REBUILD.bat
call .\Engine\Build\BatchFiles\Build.bat Game Win64 Development -project="..\..\Game\Game.uproject"
copy /y .\Game\Binaries\Win64\Game.exe .\Game\Saved\StagedBuilds\Windows\Game\Binaries\Win64\Game.exe || (echo "COPY FAILED!!" & exit /b 1)
copy /y .\Game\Binaries\Win64\Game.pdb .\Game\Saved\StagedBuilds\Windows\Game\Binaries\Win64\Game.pdb || (echo "COPY FAILED!!" & exit /b 1)
::
:: LAUNCH.bat
start .\Game\Saved\StagedBuilds\Windows\Game\Binaries\Win64\Game.exe -statnamedevents -windowed -resx=1920 -resy=1200
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment