Successfully reported this slideshow.
Your SlideShare is downloading. ×

Press Button, Drink Coffee : An Overview of UE4 build pipeline and maintenance

Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Loading in …3
×

Check these out next

1 of 136 Ad

Press Button, Drink Coffee : An Overview of UE4 build pipeline and maintenance

Download to read offline

How to build build pipeline for your Unreal Engine 4 game, along with iteration advice and best practices.

Originally presented in Poznan, Poland for GIC 19.

How to build build pipeline for your Unreal Engine 4 game, along with iteration advice and best practices.

Originally presented in Poznan, Poland for GIC 19.

Advertisement
Advertisement

More Related Content

Similar to Press Button, Drink Coffee : An Overview of UE4 build pipeline and maintenance (20)

Advertisement

More from エピック・ゲームズ・ジャパン Epic Games Japan (20)

Recently uploaded (20)

Advertisement

Press Button, Drink Coffee : An Overview of UE4 build pipeline and maintenance

  1. 1. 「Press Button, Drink Coffee」 An overview of UE4 build pipeline and maintenance
  2. 2. #UE4 | @UNREALENGINE Introduction Axel Riffard Epic Games Japan Support Engineer ● French 🇫🇷 ● Twitter : @AxRiff ● Hobbies : Whisky, Cats and Disneyland ● Currently Playing: Dragon Quest XI, COD Mobile, The Witcher III (Switch)
  3. 3. #UE4 | @UNREALENGINE FIRST OF ALL …
  4. 4. #UE4 | @UNREALENGINE HELL YEAH POLAND !
  5. 5. #UE4 | @UNREALENGINE Ruiner ! Frostpunk ! Dead Island ! Dying Light ! The Vanishing of Ethan Carter ! And …
  6. 6. #UE4 | @UNREALENGINE Geralt of Rivia ! <3
  7. 7. #UE4 | @UNREALENGINE Ok, back on topic
  8. 8. #UE4 | @UNREALENGINE
  9. 9. #UE4 | @UNREALENGINE Disclaimer There is no such thing as THE perfect pipeline. Rely on experience ! In this session, I will only talk to you about mine and give you a few best practices. But donʼt trust me, trust yourself !
  10. 10. #UE4 | @UNREALENGINE Agenda ●CI : What is it ? ●UnrealAutomationTool ●Building the Engine and your Project ●The other stuff ●The Unreal Way
  11. 11. #UE4 | @UNREALENGINE Agenda ●CI : What is it ? ●UnrealAutomationTool ●Building the Engine and your Project ●The other stuff ●The Unreal Way
  12. 12. #UE4 | @UNREALENGINE
  13. 13. #UE4 | @UNREALENGINE Dev 2 Dev 1 Dev 3 Versioning System Why ?
  14. 14. #UE4 | @UNREALENGINE ● Local build breaks after updating ● Finding the bad commit wastes time ● Communication issues, fights in the team ● Non technical members are scared to commit things ● Building locally every time is a waste Consequences
  15. 15. #UE4 | @UNREALENGINE CI Software CI = Continuous Integration A combination of software and hardware allowing to merge the team source code and assets several times every day.
  16. 16. #UE4 | @UNREALENGINE Why ? Dev 2 Dev 1 Dev 3 Versioning System
  17. 17. #UE4 | @UNREALENGINE Software
  18. 18. #UE4 | @UNREALENGINE CI Software In 2019, there is no bad choice. I have worked with both TeamCity and Jenkins, and was satisfied with both of them
  19. 19. #UE4 | @UNREALENGINE CI Software Jenkins TeamCity
  20. 20. #UE4 | @UNREALENGINE Jenkins
  21. 21. #UE4 | @UNREALENGINE Jenkins Merits︓ ● Free Open Source ● Plenty of documentation and plugins ● Huge Community Drawbacks︓ ● Commercial Support exists but is complicated ● Some plugins are unreliable
  22. 22. #UE4 | @UNREALENGINE TeamCity
  23. 23. #UE4 | @UNREALENGINE TeamCity Merits : ● Building pipelines is crazy fast ● Technical support is great Drawbacks : ● Limitations on the Free version
  24. 24. #UE4 | @UNREALENGINE CI Software Every advice can be applied to TeamCity, or any CI solution. Also, totally unrelated, but this cat looks like Jenkins mascot, so Iʼm going to use him instead.
  25. 25. #UE4 | @UNREALENGINE Hardware
  26. 26. #UE4 | @UNREALENGINE Build Machine Master → Manages the tasks. Slave → Does the tasks.
  27. 27. #UE4 | @UNREALENGINE Build Machine VersioningDEV PC CI Server Master Slack Commit Slave 1 Slave 2 Slave 3 Company Server Poll Distribute Versioning
  28. 28. #UE4 | @UNREALENGINE Build Machine – How many Prototyping Stage : ● Just the Master Production Stage : ● One Master ● One slave for every release platform
  29. 29. #UE4 | @UNREALENGINE Build Machine - OS Master︓Win64 or Linux Slave︓Win64(for platforms SDK), MacOS for Apple Platforms
  30. 30. #UE4 | @UNREALENGINE Build Machine - Windows Storage︓SSD Memory ︓32GB or more CPU︓i7 / i9
  31. 31. #UE4 | @UNREALENGINE Build Machine - MacOS No C++ and Shader compiling distribution on Mac, So get as many cores as you can for your CPU. If itʼs just for a build machine, no need for GPU. High spec Mac Mini is good enough.
  32. 32. #UE4 | @UNREALENGINE Agenda ●Continuous Integration : What is it ? ●UnrealAutomationTool ●Building the Engine and your Project ●The other stuff ●The Unreal Way
  33. 33. #UE4 | @UNREALENGINE Building in UE4 ● Engine and Editor ● Game sources ● Game Assets (lights, shaders, etc.) ● Tools
  34. 34. #UE4 | @UNREALENGINE Build Commands Find all the command lines here https://github.com/AxRiff/UnrealEngineJenkins
  35. 35. #UE4 | @UNREALENGINE UnrealAutomationTool UnrealAutomationTool is a complete system to build and test your games inside of Unreal Engine UE4 is mainly written in C++, but UnrealAutomationTool is made in C#
  36. 36. #UE4 | @UNREALENGINE UnrealAutomationTool Depending on your company size, type of project, workflow, etc., you can use different parts of UnrealAutomationTool ● BuildGraph Custom Script ● BuildGraph InstalledBuild Script ● BuildCookRun Command Line Tool
  37. 37. #UE4 | @UNREALENGINE BuildGraph
  38. 38. #UE4 | @UNREALENGINE BuildGraph BuildGraph is a script based build automation system inside of UnrealAutomationTool ● XML ● By Epic for Epic ● Original approach
  39. 39. #UE4 | @UNREALENGINE BuildGraph Youʼve got plenty of sample codes in Engine/Build/Graph/Examples/
  40. 40. #UE4 | @UNREALENGINE BuildGraph Merits : ● Reduce dependency on CI framework. ● Work on it locally -> No more Jenkins master ● XML Based : easy to read and write ● Platform Agnostic ● Can be shared between projects Drawbacks : ● Steep learning curve at first
  41. 41. #UE4 | @UNREALENGINE BuildGraph ● Agents: Group of nodes being executed on the same build machine ● Nodes: Sequence of Tasks ● Tasks: Build Process Step (Updating, Compiling, etc)
  42. 42. #UE4 | @UNREALENGINE BuildGraph <Agent Name="Default Agent" Type="CompileWin64"> <!-- Update the engine version files --> <Node Name="Update Version Files"> <SetVersion Change="$(Change)" Branch="$(EscapedBranch)" Licensee="$(Licensee)" If="$(Versioned)"/> </Node> <!-- Compile the tool executables --> <Node Name="Compile Tools Win64" Requires="Update Version Files" Produces="#ToolBinaries"> <Compile Target="UnrealHeaderTool" Platform="Win64" Configuration="Development" Tag="#ToolBinaries"/> </Node> <!-- Compile the editor executable --> <Node Name="Compile $(EditorTarget) Win64" Requires="Compile Tools Win64" Produces="#EditorBinaries"> <Compile Target="$(EditorTarget)" Platform="Win64" Configuration="Development" Tag="#EditorBinaries"/> </Node> <!-- Compile the game targets --> <Property Name="GameBinaries" Value=""/> <ForEach Name="GameTarget" Values="$(GameTargets)"> <ForEach Name="TargetPlatform" Values="$(TargetPlatforms)"> <Node Name="Compile $(GameTarget) $(TargetPlatform)" Requires="Compile Tools Win64" Produces="#GameBinaries_$(GameTarget)_$(TargetPlatform)"> <Compile Target="$(GameTarget)" Platform="$(TargetPlatform)" Configuration="Development" Tag="#GameBinaries_$(GameTarget)_$(TargetPlatform)"/> </Node> <Property Name="GameBinaries" Value="$(GameBinaries)#GameBinaries_$(GameTarget)_$(TargetPlatform);"/> </ForEach> </ForEach> </Agent>
  43. 43. #UE4 | @UNREALENGINE BuildGraph <Agent Name="Default Agent" Type="CompileWin64"> <!-- Update the engine version files --> <Node Name="Update Version Files"> <SetVersion Change="$(Change)" Branch="$(EscapedBranch)" Licensee="$(Licensee)" If="$(Versioned)"/> </Node> <!-- Compile the tool executables --> <Node Name="Compile Tools Win64" Requires="Update Version Files" Produces="#ToolBinaries"> <Compile Target="UnrealHeaderTool" Platform="Win64" Configuration="Development" Tag="#ToolBinaries"/> </Node> <!-- Compile the editor executable --> <Node Name="Compile $(EditorTarget) Win64" Requires="Compile Tools Win64" Produces="#EditorBinaries"> <Compile Target="$(EditorTarget)" Platform="Win64" Configuration="Development" Tag="#EditorBinaries"/> </Node> <!-- Compile the game targets --> <Property Name="GameBinaries" Value=""/> <ForEach Name="GameTarget" Values="$(GameTargets)"> <ForEach Name="TargetPlatform" Values="$(TargetPlatforms)"> <Node Name="Compile $(GameTarget) $(TargetPlatform)" Requires="Compile Tools Win64" Produces="#GameBinaries_$(GameTarget)_$(TargetPlatform)"> <Compile Target="$(GameTarget)" Platform="$(TargetPlatform)" Configuration="Development" Tag="#GameBinaries_$(GameTarget)_$(TargetPlatform)"/> </Node> <Property Name="GameBinaries" Value="$(GameBinaries)#GameBinaries_$(GameTarget)_$(TargetPlatform);"/> </ForEach> </ForEach> </Agent> <Agent Name="Default Agent" Type="CompileWin64">
  44. 44. #UE4 | @UNREALENGINE BuildGraph <Agent Name="Default Agent" Type="CompileWin64"> <!-- Update the engine version files --> <Node Name="Update Version Files"> <SetVersion Change="$(Change)" Branch="$(EscapedBranch)" Licensee="$(Licensee)" If="$(Versioned)"/> </Node> <!-- Compile the tool executables --> <Node Name="Compile Tools Win64" Requires="Update Version Files" Produces="#ToolBinaries"> <Compile Target="UnrealHeaderTool" Platform="Win64" Configuration="Development" Tag="#ToolBinaries"/> </Node> <!-- Compile the editor executable --> <Node Name="Compile $(EditorTarget) Win64" Requires="Compile Tools Win64" Produces="#EditorBinaries"> <Compile Target="$(EditorTarget)" Platform="Win64" Configuration="Development" Tag="#EditorBinaries"/> </Node> <!-- Compile the game targets --> <Property Name="GameBinaries" Value=""/> <ForEach Name="GameTarget" Values="$(GameTargets)"> <ForEach Name="TargetPlatform" Values="$(TargetPlatforms)"> <Node Name="Compile $(GameTarget) $(TargetPlatform)" Requires="Compile Tools Win64" Produces="#GameBinaries_$(GameTarget)_$(TargetPlatform)"> <Compile Target="$(GameTarget)" Platform="$(TargetPlatform)" Configuration="Development" Tag="#GameBinaries_$(GameTarget)_$(TargetPlatform)"/> </Node> <Property Name="GameBinaries" Value="$(GameBinaries)#GameBinaries_$(GameTarget)_$(TargetPlatform);"/> </ForEach> </ForEach> </Agent> <!-- Update the engine version files --> <Node Name="Update Version Files"> <SetVersion Change="$(Change)" Branch="$(EscapedBranch)" Licensee="$(Licensee)" If="$(Versioned)"/> </Node>
  45. 45. #UE4 | @UNREALENGINE BuildGraph <Agent Name="Default Agent" Type="CompileWin64"> <!-- Update the engine version files --> <Node Name="Update Version Files"> <SetVersion Change="$(Change)" Branch="$(EscapedBranch)" Licensee="$(Licensee)" If="$(Versioned)"/> </Node> <!-- Compile the tool executables --> <Node Name="Compile Tools Win64" Requires="Update Version Files" Produces="#ToolBinaries"> <Compile Target="UnrealHeaderTool" Platform="Win64" Configuration="Development" Tag="#ToolBinaries"/> </Node> <!-- Compile the editor executable --> <Node Name="Compile $(EditorTarget) Win64" Requires="Compile Tools Win64" Produces="#EditorBinaries"> <Compile Target="$(EditorTarget)" Platform="Win64" Configuration="Development" Tag="#EditorBinaries"/> </Node> <!-- Compile the game targets --> <Property Name="GameBinaries" Value=""/> <ForEach Name="GameTarget" Values="$(GameTargets)"> <ForEach Name="TargetPlatform" Values="$(TargetPlatforms)"> <Node Name="Compile $(GameTarget) $(TargetPlatform)" Requires="Compile Tools Win64" Produces="#GameBinaries_$(GameTarget)_$(TargetPlatform)"> <Compile Target="$(GameTarget)" Platform="$(TargetPlatform)" Configuration="Development" Tag="#GameBinaries_$(GameTarget)_$(TargetPlatform)"/> </Node> <Property Name="GameBinaries" Value="$(GameBinaries)#GameBinaries_$(GameTarget)_$(TargetPlatform);"/> </ForEach> </ForEach> </Agent> <!-- Compile the tool executables --> <Node Name="Compile Tools Win64" Requires="Update Version Files" Produces="#ToolBinaries"> <Compile Target="UnrealHeaderTool" Platform="Win64" Configuration="Development" Tag="#ToolBinaries"/> </Node>
  46. 46. #UE4 | @UNREALENGINE BuildGraph <Agent Name="Default Agent" Type="CompileWin64"> <!-- Update the engine version files --> <Node Name="Update Version Files"> <SetVersion Change="$(Change)" Branch="$(EscapedBranch)" Licensee="$(Licensee)" If="$(Versioned)"/> </Node> <!-- Compile the tool executables --> <Node Name="Compile Tools Win64" Requires="Update Version Files" Produces="#ToolBinaries"> <Compile Target="UnrealHeaderTool" Platform="Win64" Configuration="Development" Tag="#ToolBinaries"/> </Node> <!-- Compile the editor executable --> <Node Name="Compile $(EditorTarget) Win64" Requires="Compile Tools Win64" Produces="#EditorBinaries"> <Compile Target="$(EditorTarget)" Platform="Win64" Configuration="Development" Tag="#EditorBinaries"/> </Node> <!-- Compile the game targets --> <Property Name="GameBinaries" Value=""/> <ForEach Name="GameTarget" Values="$(GameTargets)"> <ForEach Name="TargetPlatform" Values="$(TargetPlatforms)"> <Node Name="Compile $(GameTarget) $(TargetPlatform)" Requires="Compile Tools Win64" Produces="#GameBinaries_$(GameTarget)_$(TargetPlatform)"> <Compile Target="$(GameTarget)" Platform="$(TargetPlatform)" Configuration="Development" Tag="#GameBinaries_$(GameTarget)_$(TargetPlatform)"/> </Node> <Property Name="GameBinaries" Value="$(GameBinaries)#GameBinaries_$(GameTarget)_$(TargetPlatform);"/> </ForEach> </ForEach> </Agent> <!-- Compile the editor executable --> <Node Name="Compile $(EditorTarget) Win64" Requires="Compile Tools Win64" Produces="#EditorBinaries"> <Compile Target="$(EditorTarget)" Platform="Win64" Configuration="Development" Tag="#EditorBinaries"/> </Node>
  47. 47. #UE4 | @UNREALENGINE BuildGraph <Agent Name="Default Agent" Type="CompileWin64"> <!-- Update the engine version files --> <Node Name="Update Version Files"> <SetVersion Change="$(Change)" Branch="$(EscapedBranch)" Licensee="$(Licensee)" If="$(Versioned)"/> </Node> <!-- Compile the tool executables --> <Node Name="Compile Tools Win64" Requires="Update Version Files" Produces="#ToolBinaries"> <Compile Target="UnrealHeaderTool" Platform="Win64" Configuration="Development" Tag="#ToolBinaries"/> </Node> <!-- Compile the editor executable --> <Node Name="Compile $(EditorTarget) Win64" Requires="Compile Tools Win64" Produces="#EditorBinaries"> <Compile Target="$(EditorTarget)" Platform="Win64" Configuration="Development" Tag="#EditorBinaries"/> </Node> <!-- Compile the game targets --> <Property Name="GameBinaries" Value=""/> <ForEach Name="GameTarget" Values="$(GameTargets)"> <ForEach Name="TargetPlatform" Values="$(TargetPlatforms)"> <Node Name="Compile $(GameTarget) $(TargetPlatform)" Requires="Compile Tools Win64" Produces="#GameBinaries_$(GameTarget)_$(TargetPlatform)"> <Compile Target="$(GameTarget)" Platform="$(TargetPlatform)" Configuration="Development" Tag="#GameBinaries_$(GameTarget)_$(TargetPlatform)"/> </Node> <Property Name="GameBinaries" Value="$(GameBinaries)#GameBinaries_$(GameTarget)_$(TargetPlatform);"/> </ForEach> </ForEach> </Agent> <!-- Compile the game targets --> <Property Name="GameBinaries" Value=""/> <ForEach Name="GameTarget" Values="$(GameTargets)"> <ForEach Name="TargetPlatform" Values="$(TargetPlatforms)"> <Node Name="Compile $(GameTarget) $(TargetPlatform)" Requires="Compile Tools Win64" Produces="#GameBinaries_$(GameTarget)_$(TargetPlatform)"> <Compile Target="$(GameTarget)" Platform="$(TargetPlatform)" Configuration="Development" Tag="#GameBinaries_$(GameTarget)_$(TargetPlatform)"/> </Node> <Property Name="GameBinaries" Value="$(GameBinaries)#GameBinaries_$(GameTarget)_$(TargetPlatform);"/> </ForEach> </ForEach>
  48. 48. #UE4 | @UNREALENGINE InstalledBuild
  49. 49. #UE4 | @UNREALENGINE InstalledBuild ● Think of it as your own Unreal Launcher ● Created by Epic to deploy a non editable engine Engine/Build/InstalledEngineBuild.xml ● Easy to use for Designers and Artists ● Engine build only. Canʼt use it to build a project.
  50. 50. #UE4 | @UNREALENGINE InstalledBuild Installed Build mains steps 1. Update Version File 2. Compile UnrealHeaderTool Win64 3. Compile UE4Editor Win64 4. Compile UE4Game Win64 5. Compile UE4Game (Platform) 6. Build Tools Win64 7. Build Tools CS 8. Make Feature Packs 9. Build DDC Win64
  51. 51. #UE4 | @UNREALENGINE InstalledBuild Engine/Build/BatchFiles/RunUAT.bat BuildGraph -target”Make Installed Build Win64” -script=/Engine/Build/InstalledEngineBuild.xml -clean
  52. 52. #UE4 | @UNREALENGINE InstalledBuild Engine/Build/BatchFiles/RunUAT.bat BuildGraph -target”Make Installed Build Win64” -script=/Engine/Build/InstalledEngineBuild.xml -clean
  53. 53. #UE4 | @UNREALENGINE InstalledBuild Engine/Build/BatchFiles/RunUAT.bat BuildGraph -target”Make Installed Build Win64” -script=/Engine/Build/InstalledEngineBuild.xml -clean
  54. 54. #UE4 | @UNREALENGINE InstalledBuild Engine/Build/BatchFiles/RunUAT.bat BuildGraph -target”Make Installed Build Win64” -script=/Engine/Build/InstalledEngineBuild.xml -clean
  55. 55. #UE4 | @UNREALENGINE BuildCookRun
  56. 56. #UE4 | @UNREALENGINE BuildCookRun
  57. 57. #UE4 | @UNREALENGINE BuildCookRun ● Script located at /Engine/Build/BatchFiles/ ● From build to package, do anything ● Highly customizable ● Command line based : nostalgic feeling ! <3
  58. 58. #UE4 | @UNREALENGINE BuildCookRun, BuildGraph, InstalledBuild ● Depending on the situation, the best choice will differ ● I think adaptability is the most important thing in game dev, so I personally use BuildCookRun most of the time.
  59. 59. #UE4 | @UNREALENGINE Agenda ●CI : What is it ? ●UnrealAutomationTool ●Building the Engine and your Project ●The other stuff ●The Unreal Way
  60. 60. #UE4 | @UNREALENGINE Command Lines
  61. 61. #UE4 | @UNREALENGINE Engine DLL Build If you donʼt edit the Engine a lot, trigger it manually If you extend the Engine a lot, do it once a day. Morning or Lunch Time is preferred
  62. 62. #UE4 | @UNREALENGINE Build Machine Jenkins Build Commit to Source Control Update Notify
  63. 63. #UE4 | @UNREALENGINE Build Command %ENGINE_ROOT%/Engine/Build/BatchFiles/RunUAT.bat BuildCookRun - project=Samples/StarterContent/StarterContent.uproject - platform=%ENGINE_PLATFORM_TARGET% - clientconfig=%ENGINE_COMPILATION_TARGET% -build ENGINE_ROOT=EngineRoot ENGINE_COMPILATION_TARGET=Development ENGINE_PLATFORM_TARGET=Win64 Yup, thatʼs a little hard to read
  64. 64. #UE4 | @UNREALENGINE Build Command Engine/Build/BatchFiles/RunUAT.bat BuildCookRun -project=Samples/StarterContent/StarterContent.uproject -platform=Win64 -clientconfig=Development -build
  65. 65. #UE4 | @UNREALENGINE Build Command Engine/Build/BatchFiles/RunUAT.bat BuildCookRun -project=Samples/StarterContent/StarterContent.uproject -platform=Win64 -clientconfig=Development -build You need a uproject to use RunUAT. You can use a sample project or blank one !
  66. 66. #UE4 | @UNREALENGINE Build Command Engine/Build/BatchFiles/RunUAT.bat BuildCookRun -project=Samples/StarterContent/StarterContent.uproject -platform=Win64 -clientconfig=Development -build
  67. 67. #UE4 | @UNREALENGINE Build Command Engine/Build/BatchFiles/RunUAT.bat BuildCookRun -project=Samples/StarterContent/StarterContent.uproject -platform=Win64 -clientconfig=Development -build
  68. 68. #UE4 | @UNREALENGINE Build Command Engine/Build/BatchFiles/RunUAT.bat BuildCookRun -project=Samples/StarterContent/StarterContent.uproject -platform=Win64 -clientconfig=Development -build
  69. 69. #UE4 | @UNREALENGINE Project DLL build Poll every 10 minutes to build Jenkins Build Commit to Source Control Update Notify
  70. 70. #UE4 | @UNREALENGINE Build Command %ENGINE_ROOT%/Engine/Build/BatchFiles/RunUAT.bat BuildCookRun -project= project=%GAME_SUB_PATH%/%GAME_NAME%.uproject - platform=%ENGINE_PLATFORM_TARGET% - clientconfig=%ENGINE_COMPILATION_TARGET% -build ENGINE_ROOT=EngineRoot ENGINE_COMPILATION_TARGET=Development ENGINE_PLATFORM_TARGET=Win64 GAME_SUB_PATH=C:/GamePath GAME_NAME=GameName
  71. 71. #UE4 | @UNREALENGINE Build Command Engine/Build/BatchFiles/RunUAT.bat BuildCookRun -project=C:/PathToTheGame/GameName.uproject -platform=Win64 -clientconfig=Development -build
  72. 72. #UE4 | @UNREALENGINE
  73. 73. #UE4 | @UNREALENGINE Packaging
  74. 74. #UE4 | @UNREALENGINE Nightly Build ● Well, itʼs build every night. ● Development, Test(for profiling), Shipping for every release platform. Time doesnʼt matter, so clean build
  75. 75. #UE4 | @UNREALENGINE Nightly Build Flow ZipJenkins Build Copy to Shared Folder Update Notify
  76. 76. #UE4 | @UNREALENGINE Build Command %ENGINE_ROOT%/Engine/Build/BatchFiles/RunUAT.bat BuildCookRun - project=%GAME_SUB_PATH%/%GAME_NAME%.uproject -noP4 - platform=%ENGINE_PLATFORM_TARGET% - clientconfig=%ENGINE_COMPILATION_TARGET% -cook -allmaps -build -stage -pak -archive -archivedirectory=%TEMP_DIR% ENGINE_ROOT=PathToYourEngine GAME_SUB_PATH=PathToYourProject GAME_NAME=UprojectFileWithoutTheExtension ENGINE_COMPILATION_TARGET=Development|Shipping|etc ENGINE_PLATFORM_TARGET=Win64|etc
  77. 77. #UE4 | @UNREALENGINE Build Command Engine/Build/BatchFiles/RunUAT.bat BuildCookRun -project=GamePath/GameName.uproject -noP4 -platform=Win64 -clientconfig=Development -cook -allmaps -build -stage -pak -archive -archivedirectory=C:/TempDirectory/
  78. 78. #UE4 | @UNREALENGINE Build Command Engine/Build/BatchFiles/RunUAT.bat BuildCookRun -project=GamePath/GameName.uproject -noP4 -platform=Win64 -clientconfig=Development -cook -allmaps -build -stage -pak -archive -archivedirectory=C:/TempDirectory/
  79. 79. #UE4 | @UNREALENGINE Build Command Engine/Build/BatchFiles/RunUAT.bat BuildCookRun -project=GamePath/GameName.uproject -noP4 -platform=Win64 -clientconfig=Development -cook -allmaps -build -stage -pak -archive -archivedirectory=C:/TempDirectory/
  80. 80. #UE4 | @UNREALENGINE Build Command Engine/Build/BatchFiles/RunUAT.bat BuildCookRun -project=GamePath/GameName.uproject -noP4 -platform=Win64 -clientconfig=Development -cook -allmaps -build -stage -pak -archive -archivedirectory=C:/TempDirectory/
  81. 81. #UE4 | @UNREALENGINE Build Command Engine/Build/BatchFiles/RunUAT.bat BuildCookRun -project=GamePath/GameName.uproject -noP4 -platform=Win64 -clientconfig=Development -cook -allmaps -build -stage -pak -archive -archivedirectory=C:/TempDirectory/
  82. 82. #UE4 | @UNREALENGINE Build Command Engine/Build/BatchFiles/RunUAT.bat BuildCookRun -project=GamePath/GameName.uproject -noP4 -platform=Win64 -clientconfig=Development -cook -allmaps -build -stage -pak -archive -archivedirectory=C:/TempDirectory/
  83. 83. #UE4 | @UNREALENGINE Build Command Engine/Build/BatchFiles/RunUAT.bat BuildCookRun -project=GamePath/GameName.uproject -noP4 -platform=Win64 -clientconfig=Development -cook -allmaps -build -stage -pak -archive -archivedirectory=C:/TempDirectory/
  84. 84. #UE4 | @UNREALENGINE Build Command Engine/Build/BatchFiles/RunUAT.bat BuildCookRun -project=GamePath/GameName.uproject -noP4 -platform=Win64 -clientconfig=Development -cook -allmaps -build -stage -pak -archive -archivedirectory=C:/TempDirectory/
  85. 85. #UE4 | @UNREALENGINE Build Command Engine/Build/BatchFiles/RunUAT.bat BuildCookRun -project=GamePath/GameName.uproject -noP4 -platform=Win64 -clientconfig=Development -cook -allmaps -build -stage -pak -archive -archivedirectory=C:/TempDirectory/
  86. 86. #UE4 | @UNREALENGINE Build Command Engine/Build/BatchFiles/RunUAT.bat BuildCookRun -project=GamePath/GameName.uproject -noP4 -platform=Win64 -clientconfig=Development -cook -allmaps -build -stage -pak -archive -archivedirectory=C:/TempDirectory/ Argument to zip all the assets in one “pak” file
  87. 87. #UE4 | @UNREALENGINE Build Command Engine/Build/BatchFiles/RunUAT.bat BuildCookRun -project=GamePath/GameName.uproject -noP4 -platform=Win64 -clientconfig=Development -cook -allmaps -build -stage -pak -archive -archivedirectory=C:/TempDirectory/
  88. 88. #UE4 | @UNREALENGINE Build Command Engine/Build/BatchFiles/RunUAT.bat BuildCookRun -project=GamePath/GameName.uproject -noP4 -platform=Win64 -clientconfig=Development -cook -allmaps -build -stage -pak -archive -archivedirectory=C:/TempDirectory/
  89. 89. #UE4 | @UNREALENGINE Build Command robocopy %ARCHIVE_DIR%/latest %ARCHIVE_DIR%/%ENGINE_PLATF ORM_TARGET%/archive /E /IS /MOV set PATH=%PATH%;C:/Program Files/7-Zip/ 7z.exe a -tzip -mmt - mx1 %ARCHIVE_DIR%/latest/%BUILD_NUMBER%.zip %TEMP_DIR%/ exit 0
  90. 90. #UE4 | @UNREALENGINE Build Command Wait a sec !!
  91. 91. #UE4 | @UNREALENGINE Build Command https://github.com/electronicarts/EACopy Twitter : @honk_dice EA DICE Studios has open sourced EACopy, a faster alternative to robocopy ! Give it a try !!!
  92. 92. #UE4 | @UNREALENGINE
  93. 93. #UE4 | @UNREALENGINE Incremental Build ● Manual Trigger ● For those “Hey mate, I need to show the build in 40 minutes to our investor / boss / publisher, do smth plz lolwut” ● Contrary to the nightly build, faster is better so … ● Use -partialgc ● Donʼt make it clean
  94. 94. #UE4 | @UNREALENGINE Incremental Build Flow Jenkins Build Send to DevKit Update Notify For DevKit deployment, check your platform But you might get an idea /Engine/Source/Programs/AutomationTool/PlatformName/PlatformNamePlatfo rm.Automation.cs
  95. 95. #UE4 | @UNREALENGINE Build Command Engine/Build/BatchFiles/RunUAT.bat BuildCookRun -project=GamePath/GameName.uproject -noP4 -platform=Win64 -clientconfig=Development -cook -allmaps -build -stage -pak -archive -partialgc -archivedirectory=C:/TempDirectory/ Instead of cleaning the memory when you run out of it, it will free it up at the end of the packaging process
  96. 96. #UE4 | @UNREALENGINE
  97. 97. #UE4 | @UNREALENGINE Jenkins Plugins
  98. 98. #UE4 | @UNREALENGINE Plugins Build Pipeline Plugin https://wiki.jenkins.io/display/JENKINS/Build+Pipeline+Plugin
  99. 99. #UE4 | @UNREALENGINE Plugins Jenkins Slack Plugin https://github.com/jenkinsci/slack-plugin
  100. 100. #UE4 | @UNREALENGINE Plugins Retaliation https://github.com/codedance/Retaliation
  101. 101. #UE4 | @UNREALENGINE Agenda ●CI : What is it ? ●UnrealAutomationTool ●Building the Engine and your Project ●The other stuff ●The Unreal Way
  102. 102. #UE4 | @UNREALENGINE Other CI Jobs
  103. 103. #UE4 | @UNREALENGINE Commandlet Command Line Applet is a command program to be run inside of Unreal Engine environment.
  104. 104. #UE4 | @UNREALENGINE Shared DDC Derived Data Cache (DDC) is a feature to keep assets that were prepared for every platform. To make it simple, itʼs an asset caching feature.
  105. 105. #UE4 | @UNREALENGINE Shared DDC Shared FolderDev PC 1 Copy Built Asset Build Assets on 1st launch
  106. 106. #UE4 | @UNREALENGINE Shared DDC Shared Folder Dev PC 5Dev PC 4 Dev PC 3Dev PC 2 Copy Built Asset
  107. 107. #UE4 | @UNREALENGINE Shared DDC Shared FolderDev PC 4 Modify / Add Asset Copy Built Asset
  108. 108. #UE4 | @UNREALENGINE Shared DDC https://docs.unrealengine.com/en- US/Engine/Basics/DerivedDataCache/index.html BaseEngine.ini [InstalledDerivedDataBackendGraph] MinimumDaysToKeepFile=7 Root=(Type=KeyLength, Length=120, Inner=AsyncPut) AsyncPut=(Type=AsyncPut, Inner=Hierarchy) Hierarchy=(Type=Hierarchical, Inner=Boot, Inner=Pak, Inner=EnginePak, Inner=Local, Inner=Shared) Boot=(Type=Boot, Filename=%GAMEDIR%DerivedDataCache/Boot.ddc, MaxCacheSize=256) Local=(Type=FileSystem, ReadOnly=false, Clean=false, Flush=false, PurgeTransient=true, DeleteUnused=true, UnusedFileAge=17, FoldersToClean=-1, Path=../../../Engine/DerivedDataCache) Shared=(Type=FileSystem, ReadOnly=false, Clean=false, Flush=false, DeleteUnused=true, UnusedFileAge=19, FoldersToClean=-1, Path=//mystudio.net/DDC, EnvPathOverride=UE-SharedDataCachePath) AltShared=(Type=FileSystem, ReadOnly=true, Clean=false, Flush=false, DeleteUnused=true, UnusedFileAge=19, FoldersToClean=-1, Path=//mystudio.net/DDC2, EnvPathOverride=UE-SharedDataCachePath2) Pak=(Type=ReadPak, Filename=%GAMEDIR%DerivedDataCache/DDC.ddp) EnginePak=(Type=ReadPak, Filename=../../../Engine/DerivedDataCache/DDC.ddp)
  109. 109. #UE4 | @UNREALENGINE Argument Type Comment ReadOnly Bool Make it false when Shared Clean Bool Delete files that went over UnusedFileAge limit Flush Bool Delete all DDC DeleteUnused Bool Il false, never deletes old assets (overrides UnusedFileAge and Clean) UnusedFileAge Int Limit of days after which an asset will be deleted, Fortnite sets it to 10. FoldersToClean Int Max limit of folders to be flushed each time. 0 or -1 means no limit. Shared DDC
  110. 110. #UE4 | @UNREALENGINE Shared DDC // Flush and Clean argument DerivedDataBackends.cpp:553 if( bFlush ) { IFileManager::Get().DeleteDirectory( *(Path / TEXT(“”)), false, true ); } else if( bClean ) { DeleteOldFiles( *Path ); } /** Delete the old files in a directory **/ void DeleteOldFiles(const TCHAR* Directory) { float MinimumDaysToKeepFile = 7; GConfig->GetFloat( *GraphName, TEXT("MinimumDaysToKeepFile"), MinimumDaysToKeepFile, GEngineIni ); check(MinimumDaysToKeepFile > 0.0f); // sanity //@todo }
  111. 111. #UE4 | @UNREALENGINE Shared DDC //@todo
  112. 112. #UE4 | @UNREALENGINE Shared DDC UE4Editor-cmd.exe ProjectName –run=DerivedDataCache -fill del /s /q c:/ServerShareDDCPath/*
  113. 113. #UE4 | @UNREALENGINE Lighting Build ● All lights except the ones calculated in real time are to be built. ● Of course, Epic is providing the tools for it. But …
  114. 114. #UE4 | @UNREALENGINE Lighting Build
  115. 115. #UE4 | @UNREALENGINE Itʼs SUPER heavy and slow Let your CI pipe do it ! Lighting Build
  116. 116. #UE4 | @UNREALENGINE Lighting Build UE4Editor-cmd.exe ProjectName -run=resavepackages -buildlighting -allowcommandletrendering
  117. 117. #UE4 | @UNREALENGINE Lighting Build There are times you want to check the lights in the editor / game In this case, build locally, and Swarm is your new BFF
  118. 118. #UE4 | @UNREALENGINE Lighting Build - Swarm With Swarm, you can distribute the task of building lights between the computers of your team. You will need a Coordinator. Your Jenkins master should do the trick. https://wiki.unrealengine.com/Swarm_Agent_Trou bleshooting
  119. 119. #UE4 | @UNREALENGINE Lighting Build - Swarm Engine/Binaries/DotNET/SwarmCoordinator.exe Engine/Binaries/DotNET/SwarmAgent.exe To add it at startup, Create a shortcut the the Agent and copy it here. %APPDATA%/Microsoft/Windows/Start Menu/Programs/Startup
  120. 120. #UE4 | @UNREALENGINE Lighting Build - Swarm
  121. 121. #UE4 | @UNREALENGINE Redirectors ● When you move or rename an asset in the editor, a Redirector is created to know the ”new address” ● Super convenient feature but it has a tendency to bug, so you will need to clean them up frequently ● Once a month is fine, but do it once a week in the critical phases of the project (alpha, beta, gold, patch release) https://docs.unrealengine.com/en-US/Engine/Basics/Redirectors/index.html
  122. 122. #UE4 | @UNREALENGINE Redirectors UE4Editor-cmd.exe ProjectName -run=fixupredirects
  123. 123. #UE4 | @UNREALENGINE Agenda ●CI : What is it ? ●UnrealAutomationTool ●Building the Engine and your Project ●The other stuff ●The Unreal Way
  124. 124. #UE4 | @UNREALENGINE The Unreal Way : Fortnite
  125. 125. #UE4 | @UNREALENGINE Fortnite ● Only engineers have Visual Studio ● We are building with BuildGraph managed by ElectricCommander ● We are heavily using UnrealGameSync
  126. 126. #UE4 | @UNREALENGINE Iteration Iteration can seem complicated without Visual Studio. But actually, itʼs pretty manageable. ● Heavily rely on PIE for testing ● Leverage your CI software properly
  127. 127. #UE4 | @UNREALENGINE Testing a Level on Device So letʼs say your artist has just changed a characterʼs hair color and wants to see how it looks on the release platform screen before committing… First, create an incremental build task on your CI software, and commit the binaries to Project/Binaries/PlatformName
  128. 128. #UE4 | @UNREALENGINE Custom Launch Profile Then in the editor, click on the triangle on the right side of of “Launch”, scroll down and create a new Custom Launch Profile Stored in /Engine/Programs/UnrealFrontend/Profiles In the profile, untick the Build step, and then you can deploy the currently edited level on the machine connected to the computer, even without Visual Studio. Magic !!
  129. 129. #UE4 | @UNREALENGINE Build Machine Jobs What I think a UE4 build pipeline should have : ● Engine Build ● Project Build ● Nightly Package ● Incremental Package ● Incremental Package for the Device Launcher ● Lightmaps Build ● Fixup Redirectors Command ● SharedDDC Cleanup Command ● SharedDDC Fillup Command Any suggestion on what to add ? Tell me in Q&A !!!
  130. 130. #UE4 | @UNREALENGINE Versioning ● Epic uses Perforce. If you want to be as close as possible to our workstyle, you know what to do ● SVN might be a little slow, but it is very reliable and still heavily used ● GIT is free, modern design choices and is very used for mobile and social games (in Japan !) SVN and Perforce have Editor support ! GIT too, but itʼs still experimental !
  131. 131. #UE4 | @UNREALENGINE UnrealGameSync Made by Epic for Epic. Heavily used on Fortnite Itʼs Perforce only, and it allows non technical staff not to have to deal with P4V
  132. 132. #UE4 | @UNREALENGINE UnrealGameSync
  133. 133. #UE4 | @UNREALENGINE UnrealGameSync P4 Server Sync Get Engine Local Builds (Binary Engine) Build Machine
  134. 134. #UE4 | @UNREALENGINE UnrealGameSync Get the latest version anytime on GitHub and Perforce. UGS dev is unrelated to UE4, so always get the latest version even if youʼve locked your engine version ! https://docs.unrealengine.com/latest/en/Programming/Deployment/Unre alGameSync/Reference/
  135. 135. #UE4 | @UNREALENGINE https://github.com/gpageot/JenkinsUE4 Twitter : @GregoryPAGEOT https://github.com/AxRiff/UnrealEngineJenkins Twitter : @AxRiff https://github.com/electronicarts/EACopy Twitter : @honk_dice Manga by @shiba_zushi, Technical Artist at Epic Games Japan. Links
  136. 136. #UE4 | @UNREALENGINE Merci !

×