「Press Button, Drink Coffee」 UE4における ビルドパイプラインとメンテナンスの全体像【CEDEC 2019】

37.9K Views

September 30, 19

スライド概要

UE4における ビルドパイプラインとメンテナンスの全体像

profile-image

Unreal Engineを開発・提供しているエピック ゲームズ ジャパンによる公式アカウントです。 勉強会や配信などで行った講演資料を公開しています。 公式サイトはこちら https://www.unrealengine.com/ja/

シェア

またはPlayer版

埋め込む »CMSなどでJSが使えない場合

関連スライド

各ページのテキスト
1.

「Press Button, Drink Coffee」 UE4における ビルドパイプラインとメンテナンスの全体像

2.

自己紹介 Axel Riffard アクセル リファール Epic Games Japan / Support Engineer ● Twitter : @AxRiff ● 趣味はPerfume、ベイスターズ、ウイスキー ● 今プレイしてるゲーム: Control (Remedy大好き) #UE4 | @UNREALENGINE

3.

序文 ゲームを作るのはもちろん楽しいですが、自動化と最適化はさらに楽しいと思い ます。 幸せといえば、書いたスクリプトのロードバーの進行を見ることです。(変なフェチかも) UE4における、毎日の作業を楽にする機能を紹介します。 #UE4 | @UNREALENGINE

4.

免責条項 完璧なパイプラインなんて存在しない。 会社の文化、チームのスキル、社内のインフラ、プロジェクトの予算、使いたい 技術、ターゲットプラットフォームによって、一番良い選択が変わってしまう。 一番頼れるのは、今までの経験です。これから紹介する技術と伝えるアドバイス は、個人の経験のまとめとエピック内のワークフローだけです。自分の経験を信 用するのが一番です。 #UE4 | @UNREALENGINE

5.

目次 ● CIとは ● UnrealAutomationTool ● エンジンとプロジェクトビルドの作業 ● その他のビルド作業 ● The Unreal Way #UE4 | @UNREALENGINE

6.

目次 ● CIとは ● UnrealAutomationTool ● エンジンとプロジェクトビルドの作業 ● その他のビルド作業 ● The Unreal Way #UE4 | @UNREALENGINE

7.

#UE4 | @UNREALENGINE

8.

どうしてこんな恐ろしいことが起きるのか Dev 1 Dev 2 Dev 3 #UE4 | @UNREALENGINE バージョン管理 しすてむ

9.

どうしてこんな恐ろしいことが起きるのか ● 更新したら、ローカルでエラーが出ていてビルド出来ない ● そのエラーを解決しようとしたら、遡りづらい ● 喧嘩したり、チーム内のコミュニケーションが複雑になる ● コミットすることでビルドを壊すかどうか不安になる ● ゲームのビルドを作ろうとしたら、時間かかって、その間は仕事できない #UE4 | @UNREALENGINE

10.

CIソフトウェア CI = Continuous Integration、継続実装 ソフトウエアとハードウエアの組み合わせで、 毎日のソースとアセットの実装と更新を管理してくれるソリューション #UE4 | @UNREALENGINE

11.

どうしてこんな恐ろしいことが起きるのか Dev 1 Dev 2 Dev 3 #UE4 | @UNREALENGINE バージョン管理 しすてむ

12.

ソフトウェア #UE4 | @UNREALENGINE

13.

CIソフトウェア 今の世代で、悪い選択がないでしょう。 過去に、TeamCityとJenkinsも利用したことがあって、どっちも満足しました。 #UE4 | @UNREALENGINE

14.

CIソフトウェア Jenkins #UE4 | @UNREALENGINE TeamCity

15.

Jenkins #UE4 | @UNREALENGINE

16.

Jenkins メリット: ● Free Open Source ● ドキュメンテーションとプラグインがいっぱい ● コミュニティーがデカい デメリット: ● 公式サポートがない ● プラグインのクオリティはバラバラ #UE4 | @UNREALENGINE

17.

TeamCity #UE4 | @UNREALENGINE

18.

TeamCity メリット ● パイプラインを作るの速い ● 公式サポートがある デメリット ● 無料版だと機能が限られている #UE4 | @UNREALENGINE

19.

CIソフトウエア 日本のゲーム業界でジェンキンスが一番人気があると思うから、これからの話は ジェンキンス中心になる。 ただ、全アドバイスとコマンドはどんなCIソフトウエアでも使える。 似てるから、ジェンキンスおじさんの変わりに、この猫を使わせていただきます。 #UE4 | @UNREALENGINE

20.

ハードウェア #UE4 | @UNREALENGINE

21.

ビルドマシン マスター → 作業を管理しているマシン、サーバー スレーブ → 実際の作業を行うマシン #UE4 | @UNREALENGINE

22.

ビルドマシン DEV PC Commit バージョン 管理 Poll CI Server Master Slave 1 #UE4 | @UNREALENGINE バージョン 管理 Slave 2 Slack Distribute Slave 3 Company Server

23.

ビルドマシン - マシン数 プロトタイプ中: マスターのみに1台 開発中: マスター1台 リリースプラットフォームごとにスレーブが1台 #UE4 | @UNREALENGINE

24.

ビルドマシン - OS マスター:Win64かLinux スレーブ:Win64(プラットフォームのSDKのため)、りんご系の場合はMacOS #UE4 | @UNREALENGINE

25.

ビルドマシン - Windows ストレージ:SSD メモリ:32GB~ CPU:AMD Threadripperはライセンシーにおすすめされた。 15分でフルリコンパイルできる。 #UE4 | @UNREALENGINE

26.

ビルドマシン - MacOS Macでコンパイルの分散が出来ないので、 シェーダーのコンパイルを考えると、 できるだけCPUのコアを多く。そろそろ発売するMacプロがいいかもしれない。 予算があまりなければ、個人的には6コアのMacミニで行けると思います。 #UE4 | @UNREALENGINE

27.

目次 ● CIとは ● UnrealAutomationTool ● エンジンとプロジェクトビルドの作業 ● その他のビルド作業 ● The Unreal Way #UE4 | @UNREALENGINE

28.

UE4のビルド ● ● ● ● エンジンとエンジンエディター ゲームのソース ゲームのアセット(ライト、シェーダー、etc) ツール #UE4 | @UNREALENGINE

29.

ビルドコマンド これからCI用のビルドコマンドをいくつか紹介する。 メモしづらいと思うから、gitHubでも公開するぞ! https://github.com/AxRiff/UnrealEngineJenkins #UE4 | @UNREALENGINE

30.

UnrealAutomationTool UnrealAutomationToolは、ゲームのテストやビルドなどのプロセスを自動化す るために使用される一般的なシステム。 UE4は主にC++で作られているが、UnrealAutomationToolは主にC#。 UnrealAutomationToolを使って、CIソフトウエアでコマンドラインをビルドす ることができる。 #UE4 | @UNREALENGINE

31.

UnrealAutomationTool 会社、プロジェクトの種類、そしてワークフローによって、ビルドする選択肢が 三つある。 ● BuildGraphのカスタムスクリプト ● BuildGraphのInstalledBuildScript ● BuildCookRunのコマンドラインツール #UE4 | @UNREALENGINE

32.

BuildGraph #UE4 | @UNREALENGINE

33.

BuildGraph BuildGraphはUnrealAutomationToolの中のスクリプトベースのビルド自動化シ ステム。 ● XMLでビルドスクリプトを書く ● 日本語のドキュメンテーションがちゃんとしてる ● エピックのプロジェクトのためにエピックが作ったツール。今でもよく使って おる ● 他のビルド ツールとは異なり、BuildGraphはmakefileのようなスクリプティン グ言語とビルドマシンのコンフィギュレーション スクリプトとを合わせたアプ ローチ #UE4 | @UNREALENGINE

34.

BuildGraph サンプルコードがいっぱいで、分かりやすい Engine/Build/Graph/Examples/ #UE4 | @UNREALENGINE

35.

BuildGraph メリット ● CIフレームワークへの依存を減らす。 ● ローカルでテストと編集可能 → CI達人に頼らなくてもいい ● XMLベースなので読みやすい ● プラットフォームに不可知的 ● いろんなプロジェクトで共有できる デメリット ● なれるまで時間がかかる #UE4 | @UNREALENGINE

36.

BuildGraph ● Agents: 同じマシンで実行される複数のノードのグループ ● Nodes: タスクのシーケンス ● Tasks: ビルド プロセスの一部として実行されるアクション (コンパイル、 クックなど) #UE4 | @UNREALENGINE

37.

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> #UE4 | @UNREALENGINE

38.

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> <Agent Name="Default Agent" Type="CompileWin64"> <!-- 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> #UE4 | @UNREALENGINE

39.

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"version Requires="Update <!-Update the engine filesVersion --> Files" Produces="#ToolBinaries"> <Compile Target="UnrealHeaderTool" Platform="Win64" Configuration="Development" Tag="#ToolBinaries"/> </Node> <Node Name="Update Version Files"> <SetVersion Change="$(Change)" Branch="$(EscapedBranch)" <!-- Compile the editor executable --> <Node Name="Compile $(EditorTarget) Win64" Requires="Compile Tools Win64" Produces="#EditorBinaries"> Licensee="$(Licensee)" If="$(Versioned)"/> <Compile Target="$(EditorTarget)" Platform="Win64" Configuration="Development" Tag="#EditorBinaries"/> </Node> </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> #UE4 | @UNREALENGINE

40.

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 tool executables --> <!-- Compile the editor executable --> <Node Name="Compile $(EditorTarget) Win64" Requires="Compile Win64" Produces="#EditorBinaries"> <Node Name="Compile Tools Win64"Tools Requires="Update Version Files" <Compile Target="$(EditorTarget)" Platform="Win64" Configuration="Development" Tag="#EditorBinaries"/> </Node> Produces="#ToolBinaries"> <!-- Compile<Compile the game targets --> Target="UnrealHeaderTool" Platform="Win64" <Property Name="GameBinaries" Value=""/> <ForEach Name="GameTarget" Values="$(GameTargets)"> Configuration="Development" Tag="#ToolBinaries"/> <ForEach Name="TargetPlatform" Values="$(TargetPlatforms)"> <Node Name="Compile $(GameTarget) $(TargetPlatform)" Requires="Compile Tools Win64" </Node> Produces="#GameBinaries_$(GameTarget)_$(TargetPlatform)"> </ForEach> </Agent> #UE4 | @UNREALENGINE </ForEach> <Compile Target="$(GameTarget)" Platform="$(TargetPlatform)" Configuration="Development" Tag="#GameBinaries_$(GameTarget)_$(TargetPlatform)"/> </Node> <Property Name="GameBinaries" Value="$(GameBinaries)#GameBinaries_$(GameTarget)_$(TargetPlatform);"/>

41.

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 Compile the game --> executable --> <!-thetargets editor <Property Name="GameBinaries" Value=""/> <Node Name="Compile $(EditorTarget) Win64" Requires="Compile Tools Win64" <ForEach Name="GameTarget" Values="$(GameTargets)"> <ForEach Name="TargetPlatform" Values="$(TargetPlatforms)"> Produces="#EditorBinaries"> <Node Name="Compile $(GameTarget) $(TargetPlatform)" Requires="Compile Tools Win64" Produces="#GameBinaries_$(GameTarget)_$(TargetPlatform)"> <Compile Target="$(EditorTarget)" Platform="Win64" <Compile Target="$(GameTarget)" Platform="$(TargetPlatform)" Configuration="Development" Tag="#GameBinaries_$(GameTarget)_$(TargetPlatform)"/> Configuration="Development" Tag="#EditorBinaries"/> </Node> </Node> <Property Name="GameBinaries" Value="$(GameBinaries)#GameBinaries_$(GameTarget)_$(TargetPlatform);"/> </ForEach> </Agent> #UE4 | @UNREALENGINE </ForEach>

42.

BuildGraph <!-- Compile the game targets --> <Property Name="GameBinaries" Value=""/> <ForEach Name="GameTarget" Values="$(GameTargets)"> <ForEach Name="TargetPlatform" Values="$(TargetPlatforms)"> <Node <!-- Compile the tool executables --> Name="Compile $(GameTarget) $(TargetPlatform)" <Node Name="Compile Tools Win64" Requires="Update Version Files" Produces="#ToolBinaries"> Requires="Compile Tools Win64" <Compile Target="UnrealHeaderTool" Platform="Win64" Configuration="Development" Tag="#ToolBinaries"/> </Node>Produces="#GameBinaries_$(GameTarget)_$(TargetPlatform)"> <Compile Target="$(GameTarget)" Platform="$(TargetPlatform)" <!-- Compile the editor executable --> <Node Name="Compile $(EditorTarget) Win64" Requires="Compile Tools Win64" Produces="#EditorBinaries"> Configuration="Development" <Compile Target="$(EditorTarget)" Platform="Win64" Configuration="Development" Tag="#EditorBinaries"/> </Node> Tag="#GameBinaries_$(GameTarget)_$(TargetPlatform)"/> <!-- Compile the game targets --> </Node> <Property Name="GameBinaries" Value=""/> <Property Name="GameBinaries" <ForEach Name="GameTarget" Values="$(GameTargets)"> <ForEach Name="TargetPlatform" Values="$(TargetPlatforms)"> Value="$(GameBinaries)#GameBinaries_$(GameTarget)_$(TargetPlatform);"/> <Node Name="Compile $(GameTarget) $(TargetPlatform)" Requires="Compile Tools Win64" Produces="#GameBinaries_$(GameTarget)_$(TargetPlatform)"> </ForEach> <Compile Target="$(GameTarget)" Platform="$(TargetPlatform)" Configuration="Development" Tag="#GameBinaries_$(GameTarget)_$(TargetPlatform)"/> </ForEach> <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> </ForEach> </Agent> #UE4 | @UNREALENGINE </ForEach> </Node> <Property Name="GameBinaries" Value="$(GameBinaries)#GameBinaries_$(GameTarget)_$(TargetPlatform);"/>

43.

InstalledBuild #UE4 | @UNREALENGINE

44.

InstalledBuild ● 皆様の会社のアンリアルランチャーだと思って下さい ● エンジンを提供するためエピックが作ったBuildGraphのスクリプト Engine/Build/InstalledEngineBuild.xml ● デザイナーとアーティストに優しい ● エンジンビルドのみ。プロジェクトをビルドしない #UE4 | @UNREALENGINE

45.

Installed Build Installed Buildの主なステップ 1. 2. 3. 4. 5. 6. 7. 8. 9. Update Version File Compile UnrealHeaderTool Win64 Compile UE4Editor Win64 Compile UE4Game Win64 Compile UE4Game (Platform) Build Tools Win64 Build Tools CS Make Feature Packs Build DDC Win64 #UE4 | @UNREALENGINE

46.

InstalledBuild Engine/Build/BatchFiles/RunUAT.bat BuildGraph -target”Make Installed Build Win64” -script=/Engine/Build/InstalledEngineBuild.xml -clean #UE4 | @UNREALENGINE

47.

InstalledBuild Engine/Build/BatchFiles/RunUAT.bat BuildGraph -target”Make Installed Build Win64” -script=/Engine/Build/InstalledEngineBuild.xml -clean #UE4 | @UNREALENGINE

48.

InstalledBuild Engine/Build/BatchFiles/RunUAT.bat BuildGraph -target”Make Installed Build Win64” -script=/Engine/Build/InstalledEngineBuild.xml -clean #UE4 | @UNREALENGINE

49.

InstalledBuild Engine/Build/BatchFiles/RunUAT.bat BuildGraph -target”Make Installed Build Win64” -script=/Engine/Build/InstalledEngineBuild.xml -clean #UE4 | @UNREALENGINE

50.

BuildCookRun #UE4 | @UNREALENGINE

51.

BuildCookRun #UE4 | @UNREALENGINE

52.

BuildCookRun ● /Engine/Build/BatchFiles/ にあるスクリプト ● ビルドから、パッケージまで、何でもできる ● カスタムしやすい ● 使用の際にLinux/UNIX感の懐かしくて温かい気持ちになる #UE4 | @UNREALENGINE

53.

BuildCookRun, BuildGraph, InstalledBuild ● 状況によって、一番合ってるやり方が変わる ● 個人的に、ゲーム開発の場合は、柔軟性と変更可能な技術が重要かと思うか ら、BuildCookRunが一番仕事しやすい ● これから紹介するコマンドラインでBuildCookRunで実行する。でも全ての コマンドがBuildGraphでもできる #UE4 | @UNREALENGINE

54.

目次 ● CIとは ● UnrealAutomationTool ● エンジンとプロジェクトビルドの作業 ● その他のビルド作業 ● The Unreal Way #UE4 | @UNREALENGINE

55.

コマンドライン #UE4 | @UNREALENGINE

56.

エンジンDLLビルド エンジンの編集が少なかったら、手動でビルドするCIの作業 多かったら、一日一回でいいと思います。ただそれは夜ではなく、朝か昼にす るのがおすすめ #UE4 | @UNREALENGINE

57.

ビルドマシン Commit to Source Control Jenkins Update Build Notify #UE4 | @UNREALENGINE

58.

ビルドコマンド %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 大分読みづらいにゃ、ちょっと読 みやすくしよう #UE4 | @UNREALENGINE

59.

ビルドコマンド Engine/Build/BatchFiles/RunUAT.bat BuildCookRun -project=Samples/StarterContent/StarterContent.uproject -platform=Win64 -clientconfig=Development -build #UE4 | @UNREALENGINE

60.

ビルドコマンド Engine/Build/BatchFiles/RunUAT.bat BuildCookRun -project=Samples/StarterContent/StarterContent.uproject -platform=Win64 -clientconfig=Development -build RunUATを使うには、uprojectファイルが必要 なので、テンプレートか空っぽのプロジェクト にしにゃしょう。 #UE4 | @UNREALENGINE

61.

ビルドコマンド Engine/Build/BatchFiles/RunUAT.bat BuildCookRun -project=Samples/StarterContent/StarterContent.uproject -platform=Win64 -clientconfig=Development -build #UE4 | @UNREALENGINE

62.

ビルドコマンド Engine/Build/BatchFiles/RunUAT.bat BuildCookRun -project=Samples/StarterContent/StarterContent.uproject -platform=Win64 -clientconfig=Development -build #UE4 | @UNREALENGINE

63.

ビルドコマンド Engine/Build/BatchFiles/RunUAT.bat BuildCookRun -project=Samples/StarterContent/StarterContent.uproject -platform=Win64 -clientconfig=Development -build #UE4 | @UNREALENGINE

64.

プロジェクトDLLビルド 10分ごとにバージョン管理しすてむを確認して、自動でビルド。 Commit to Source Control Jenkins Update Build Notify #UE4 | @UNREALENGINE

65.

ビルドコマンド %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 #UE4 | @UNREALENGINE

66.

ビルドコマンド Engine/Build/BatchFiles/RunUAT.bat BuildCookRun -project=C:/PathToTheGame/GameName.uproject -platform=Win64 -clientconfig=Development -build #UE4 | @UNREALENGINE

67.

#UE4 | @UNREALENGINE

68.

パッケージ #UE4 | @UNREALENGINE

69.

Nightly Build ● 毎晩走らせるパッケージ ● Development、Test(プロファイルとるため)、そしてShipping (販売版に近い バージョン)、ターゲットごとに作る 時間がかかっても大丈夫なので、クリーン、フルリビルドがおすすめ #UE4 | @UNREALENGINE

70.

Nightly Build フロー Copy to Shared Folder Jenkins Update Build Zip Notify #UE4 | @UNREALENGINE

71.

ビルドコマンド %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 #UE4 | @UNREALENGINE

72.

ビルドコマンド Engine/Build/BatchFiles/RunUAT.bat BuildCookRun -project=GamePath/GameName.uproject -noP4 -platform=Win64 -clientconfig=Development -cook -allmaps -build -stage -pak -archive -archivedirectory=C:/TempDirectory/ #UE4 | @UNREALENGINE

73.

ビルドコマンド Engine/Build/BatchFiles/RunUAT.bat BuildCookRun -project=GamePath/GameName.uproject -noP4 -platform=Win64 -clientconfig=Development -cook -allmaps -build -stage -pak -archive -archivedirectory=C:/TempDirectory/ #UE4 | @UNREALENGINE

74.

ビルドコマンド Engine/Build/BatchFiles/RunUAT.bat BuildCookRun -project=GamePath/GameName.uproject -noP4 -platform=Win64 -clientconfig=Development -cook -allmaps -build -stage -pak -archive -archivedirectory=C:/TempDirectory/ #UE4 | @UNREALENGINE

75.

ビルドコマンド Engine/Build/BatchFiles/RunUAT.bat BuildCookRun -project=GamePath/GameName.uproject -noP4 -platform=Win64 -clientconfig=Development -cook -allmaps -build -stage -pak -archive -archivedirectory=C:/TempDirectory/ #UE4 | @UNREALENGINE

76.

ビルドコマンド Engine/Build/BatchFiles/RunUAT.bat BuildCookRun -project=GamePath/GameName.uproject -noP4 -platform=Win64 -clientconfig=Development -cook -allmaps -build -stage -pak -archive -archivedirectory=C:/TempDirectory/ #UE4 | @UNREALENGINE

77.

ビルドコマンド Engine/Build/BatchFiles/RunUAT.bat BuildCookRun -project=GamePath/GameName.uproject -noP4 -platform=Win64 -clientconfig=Development -cook -allmaps -build -stage -pak -archive -archivedirectory=C:/TempDirectory/ #UE4 | @UNREALENGINE

78.

ビルドコマンド Engine/Build/BatchFiles/RunUAT.bat BuildCookRun -project=GamePath/GameName.uproject -noP4 -platform=Win64 -clientconfig=Development -cook -allmaps -build -stage -pak -archive -archivedirectory=C:/TempDirectory/ #UE4 | @UNREALENGINE

79.

ビルドコマンド Engine/Build/BatchFiles/RunUAT.bat BuildCookRun -project=GamePath/GameName.uproject -noP4 -platform=Win64 -clientconfig=Development -cook -allmaps -build -stage -pak -archive -archivedirectory=C:/TempDirectory/ #UE4 | @UNREALENGINE

80.

ビルドコマンド Engine/Build/BatchFiles/RunUAT.bat BuildCookRun -project=GamePath/GameName.uproject -noP4 -platform=Win64 -clientconfig=Development -cook -allmaps -build -stage -pak -archive -archivedirectory=C:/TempDirectory/ #UE4 | @UNREALENGINE

81.

ビルドコマンド Engine/Build/BatchFiles/RunUAT.bat BuildCookRun -project=GamePath/GameName.uproject -noP4 -platform=Win64 -clientconfig=Development -cook 各ファイル全てをコピーする代わりに、全アセットを単一「.pak」フ -allmaps ァイルに格納する。プロジェクトにたくさんのアセットファイルがあ -build る場合、Pak ファイルを使用した方が配布が容易になる場合がある。 -stage -pak -archive -archivedirectory=C:/TempDirectory/ #UE4 | @UNREALENGINE

82.

ビルドコマンド Engine/Build/BatchFiles/RunUAT.bat BuildCookRun -project=GamePath/GameName.uproject -noP4 -platform=Win64 -clientconfig=Development -cook -allmaps -build -stage -pak -archive -archivedirectory=C:/TempDirectory/ #UE4 | @UNREALENGINE

83.

ビルドコマンド Engine/Build/BatchFiles/RunUAT.bat BuildCookRun -project=GamePath/GameName.uproject -noP4 -platform=Win64 -clientconfig=Development -cook -allmaps -build -stage -pak -archive -archivedirectory=C:/TempDirectory/ #UE4 | @UNREALENGINE

84.

ビルドコマンド 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 #UE4 | @UNREALENGINE

85.

ビルドコマンド ちょっと待ったにゃ!! #UE4 | @UNREALENGINE

86.

ビルドコマンド EAさんのhigh endスタジオ、DICEが、robocopyよりさらに速い、ビルドマ シン用のコピーツールをオープンソースにした! EACopy ちょっとしか試していないけど、凄く速いです! https://github.com/electronicarts/EACopy Twitter : @honk_dice #UE4 | @UNREALENGINE

87.

#UE4 | @UNREALENGINE

88.

Incremental Build ● 手動起動 ● 「ごめん、一時間後パブリッシャー/社長に会議でビルドを見せなきゃいけな いから、何とかして」というときに ● Nightly Buildと違って、時間がないから… ● -partialgcを付ける ● クリーンビルドじゃなくてもいい #UE4 | @UNREALENGINE

89.

Incremental Build フロー Send to DevKit Jenkins Update Build Notify 開発機までの接続は、各メーカーのSDKを確認してください。 また、エディターからdeployするときにエンジン内でも同じことするので、 /Engine/Source/Programs/AutomationTool/PlatformName/PlatformNamePlatfo rm.Automation.csを見てね #UE4 | @UNREALENGINE

90.

ビルドコマンド 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/ #UE4 | @UNREALENGINE

91.

#UE4 | @UNREALENGINE

92.

Jenkins Plugins #UE4 | @UNREALENGINE

93.

Plugins Build Pipeline Plugin https://wiki.jenkins.io/display/JENKINS/Build+Pipeline+Plugin #UE4 | @UNREALENGINE

94.

Plugins Jenkins Slack Plugin https://github.com/jenkinsci/slack-plugin #UE4 | @UNREALENGINE

95.

Plugins Retaliation https://github.com/codedance/Retaliation #UE4 | @UNREALENGINE

96.

目次 ● CIとは ● UnrealAutomationTool ● エンジンとプロジェクトビルドの作業 ● その他のビルド作業 ● The Unreal Way #UE4 | @UNREALENGINE

97.

その他のビルドCI Jobs #UE4 | @UNREALENGINE

98.

Commandlet Command Line Applet → コマンドレットとは、Unreal Engineの環境内で 作動するコマンドラインプログラム #UE4 | @UNREALENGINE

99.

Shared DDC Derived Data Cache (DDC) は、エンジンとターゲットプラットフォームが使 用するフォーマットでアセットのバージョンを保存する機能 簡単にいうと、みんなが利用しているアセットをキャッシュする #UE4 | @UNREALENGINE

100.

Shared DDC Dev PC 1 Build Assets on 1st launch #UE4 | @UNREALENGINE Copy Built Asset Shared Folder

101.

Shared DDC Dev PC 2 Dev PC 3 Shared Folder Dev PC 4 #UE4 | @UNREALENGINE Copy Built Asset Dev PC 5

102.

Shared DDC Dev PC 4 Modify / Add Asset #UE4 | @UNREALENGINE Copy Built Asset Shared Folder

103.

Shared DDC https://docs.unrealengine.com/enUS/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) #UE4 | @UNREALENGINE

104.

Shared DDC #UE4 | @UNREALENGINE

105.
[beta]
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
}

#UE4 | @UNREALENGINE

106.

Shared DDC //@todo #UE4 | @UNREALENGINE

107.

Shared DDC del /s /q c:/ServerShareDDCPath/* UE4Editor-cmd.exe ProjectName –run=DerivedDataCache -fill #UE4 | @UNREALENGINE

108.

Lighting Build ● リアルタイムライト以外の照明は、クックしなきゃいけない。 ● もちろん、エピックがクックするためのツールを提供している。 ただ… #UE4 | @UNREALENGINE

109.

Lighting Build #UE4 | @UNREALENGINE

110.

Lighting Build 遅い。とても なので夜間にCIソフトウエアに任せるのが正しい 毎晩、自動で、このJobを走らせましょう #UE4 | @UNREALENGINE

111.

Lighting Build UE4Editor-cmd.exe ProjectName -run=resavepackages -buildlighting -allowcommandletrendering #UE4 | @UNREALENGINE

112.

Lighting Build Editorで作業して、ライトを確認したいときに、 ローカルでライトビルドするのは現実的 そのプロセスを早くするため、Swarmがある #UE4 | @UNREALENGINE

113.

Lighting Build - Swarm Swarmは、UE4の高品質なスタティック グローバル イ ルミネーション ソルバである Unreal のライトマスを 含むタスク分散システム Coordinatorは、ジェンキンスマスターでいいと思う https://wiki.unrealengine.com/Swarm_Agent_Trou bleshooting #UE4 | @UNREALENGINE

114.

Lighting Build - Swarm Engine/Binaries/DotNET/SwarmCoordinator.exe Engine/Binaries/DotNET/SwarmAgent.exe Startupに追加する : ショートカットを作成して、 %APPDATA%/Microsoft/Windows/Start Menu/Programs/Startupまでコピーする #UE4 | @UNREALENGINE

115.

Lighting Build - Swarm #UE4 | @UNREALENGINE

116.

Redirectors ● Redirectorは、UE4 でアセットを移動したり名前の変更をするとき、変更先を検 出するためのもので、元の位置に‘Redirector’が残される ● 残し方によっては、バグりやすくなるから、綺麗にする必要がある ● 大体、月一回でいいと思います。危ないとき(エンジンのマージあと、アルファ版 かベータ版のリリースの後)、週一回にしましょう! https://docs.unrealengine.com/en-US/Engine/Basics/Redirectors/index.html #UE4 | @UNREALENGINE

117.

Redirectors UE4Editor-cmd.exe ProjectName -run=fixupredirects #UE4 | @UNREALENGINE

118.

目次 ● CIとは ● UnrealAutomationTool ● エンジンとプロジェクトビルドの作業 ● その他のビルド作業 ● The Unreal Way #UE4 | @UNREALENGINE

119.

The Unreal Way : Fortnite #UE4 | @UNREALENGINE

120.

Fortnite ● エンジニアしかVisualStudioを持たない ● ElectricCommanderとBuildGraphを利用している ● UnrealGameSyncを使用している #UE4 | @UNREALENGINE

121.

イテレーション VSがなかったら、難しそうですね? 実は、そうでもない。覚悟が必要ですけど ● PIEを出来るだけ使おう ● CIソフトウエアのビルドを上手く使おう #UE4 | @UNREALENGINE

122.

デバイスで今のレベルを試したいときに… キャラクターの髪の毛の色を変更して、コミットする前に端末のディスプレイ で確認したいけど、VSがないから、ビルド出来ないというシナリオだと… まずは、 CIソフトウエアでincremental buildの作業を作って、 Project/Binaries/各プラットフォームのフォルダーでビルドマシンにコミット させる #UE4 | @UNREALENGINE

123.

Custom Launch Profile そしてエディターのLaunchボタンの右の三角形 をクリック、 Project LauncherのCustom Launch Profileが 追加されたファイルを編集する プロファイルはプロジェクト側ではなく、 /Engine/Programs/UnrealFrontend/Profiles に保存される プロファイルからBuildのステップを外してパソ コンに繋がっているデバイスにdeployしたら、 誰でもいつでも、VisualStudioを持たずに、タ ーゲットプラットフォームでプレイが出来る #UE4 | @UNREALENGINE

124.

ビルドマシンまとめ UE4のパイプラインにあるはずのJobs : ● エンジンビルド ● プロジェクトビルド ● 夜プロジェクトパッケージ ● Incrementalプロジェクトパッケージ ● InstalledBuildを使わない場合は、Project Launcher用ビルド ● ライトマップビルド ● Fixup Redirectorsコマンドレット ● SharedDDCクリーンアップ ● SharedDDCのfill #UE4 | @UNREALENGINE

125.

バージョン管理しすてむ ● エピックはPerforceを使用しているため、使ったらエピック環境に一番近く なるが、有料ソフトウエアである ● SVNがちょっとだけ遅いかもしれないが、長く使われていて頼れる ● GITは無料で、モバイルとソシャゲで良く使われている SVNとPerforceはエディターでサポートします!GITにも対応しているけど、ま だExperimental! #UE4 | @UNREALENGINE

126.

UnrealGameSync Fortniteなどのエピック内のプロジェクトのためにエピックが作ったツール Perforceのみだが、P4Vの代わりに使えるUI。ノンテクニカルの開発者におすすめ #UE4 | @UNREALENGINE

127.

UnrealGameSync #UE4 | @UNREALENGINE

128.

UnrealGameSync Sync Engine (コードあり) Get P4サーバー 生成 Local Builds (Binary Engine) ビルドマシン #UE4 | @UNREALENGINE

129.

UnrealGameSync 最新版はPerforceとGitHubでいつでも。 UE4と関係がないので、エンジンのバージョンにロックをかけていてもUGSの最 新版をゲットしよう https://docs.unrealengine.com/latest/ja/Programming/Deployment/Unrea lGameSync/Reference/ #UE4 | @UNREALENGINE

130.

Links 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。まいど! #UE4 | @UNREALENGINE

131.

Un re a l Fe s t Ea s t 2019 2019 / 10 / 6 パシフィコ横浜 #UE4 | @UNREALENGINE

132.

Merci ! #UE4 | @UNREALENGINE