ue4:distributedbuildtool
分散ビルド
UnrealEngine を使った開発を行う場合、エンジンや巨大なプロジェクトをビルドするなら分散ビルドは必須です。
ただし最近の PC は CPU core を多数搭載し、かつ SSD も当たり前になったので以前よりもビルド速度は向上しています。 その代わりエンジン自体も機能が追加されているため新しいバージョンほどビルド時間は延びており、また大量のソースコードやシェーダが含まれるプロジェクトだとかなり時間がかかります。
UnrealEngine が対応している分散ビルドシステムには下記のものがあります。
| 分散ビルドツール | UE5 | C++ | Shader | Tool 対応 Platform | UE5/UE4 の対応 Platform (未確認) | |
|---|---|---|---|---|---|---|
| UnrealBuildAccelerator (UBA) | UE5 | UE5 5.4 以降に付属 | UE5 5.4 以降 | UE5 5.5 以降 | Windows/Linux/その他 | Windows/Linux/その他 |
| IncrediBuild | UE4/UE5 | 有料、ライセンス料金が必要 | 対応 | 対応 | Windows/Linux/その他 | Windows/Linux/その他 |
| SN-DBS | UE4/UE5 | Sony Platform の開発専用 | 対応 | UE4 4.27以降で対応 | Windows/PS | Windows/PS |
| FASTBuild | UE5 | オープンソース | 対応 | UE5 5.0 Release 以降 | Windows/Mac/Linux/その他 | Windows/Mac/その他 |
| Distcc | UE4 | Windows 以外、オープンソース | 対応 | 非対応 (未確認) | Mac/Linux (未確認) | Mac (未確認) |
分散ビルドできるのは UnrealEngine の C++ のコンパイルと Shader です。
- 分散ビルド使用時のコンパイル時間は CPU Thread 数だけでなくネットワーク速度とストレージ速度にも依存します。
- SN-DBS は UE4 4.27 以降で Shader の分散ビルドに対応しました。UE5 Release 版でも対応しています。(5.0 EA は非対応)
- FASTBuild は UE5 Release 版以降で Shader の分散ビルドに対応を行っているようです。(5.0 EA は非対応)
- Linux Host での分散ビルドは未確認ですが、Windows 上で Linux CrossToolchain を使用する場合は分散ビルドが可能です。
分散ビルドの有効化
BuildConfiguration.xml (USERPROFILE/Documents/Unreal Engine/UnrealBuildTool/BuildConfiguration.xml) を使います。
- IncrediBuild, SN-DBS はインストールされていれば自動的に有効になります。明示的に有効化・無効化したい場合は BuildConfiguration.xml で設定してください。
- UBA (UnrealBuildAccelerator/HordeServer) を使う場合は BuildConfiguration.xml で明示的にサーバーを設定する必要があります。
以下は UE5 での設定例です。
<?xml version='1.0' encoding='utf-8'?> <Configuration xmlns="https://www.unrealengine.com/BuildConfiguration"> <BuildConfiguration> <bAllowXGE>true</bAllowXGE> <bAllowSNDBS>false</bAllowSNDBS> <bAllowFASTBuild>false</bAllowFASTBuild> <bAllowUBAExecutor>false</bAllowUBAExecutor> </BuildConfiguration> </Configuration>
UE5 で UBA (UnrealBuildAccelerator/HordeServer) を使う場合の設定例です。Horde.Server で HordeServer を指定しておく必要があります。
<?xml version='1.0' encoding='utf-8'?> <Configuration xmlns="https://www.unrealengine.com/BuildConfiguration"> <BuildConfiguration> <bAllowXGE>false</bAllowXGE> <bAllowSNDBS>false</bAllowSNDBS> <bAllowFASTBuild>false</bAllowFASTBuild> <bAllowUBAExecutor>true</bAllowUBAExecutor> </BuildConfiguration> <Horde> <Server>http://192.168.0.100:13340</Server> <WindowsPool>Win-UE5</WindowsPool> </Horde> <UnrealBuildAccelerator> <bLaunchVisualizer>false</bLaunchVisualizer> </UnrealBuildAccelerator> </Configuration>
以下は敢えて分散ビルドを使わずにビルドする場合の設定例です。分散ビルドを全て無効化しています。
<?xml version='1.0' encoding='utf-8'?> <Configuration xmlns="https://www.unrealengine.com/BuildConfiguration"> <BuildConfiguration> <bAllowXGE>false</bAllowXGE> <bAllowSNDBS>false</bAllowSNDBS> <bAllowFASTBuild>false</bAllowFASTBuild> <bAllowUBAExecutor>false</bAllowUBAExecutor> </BuildConfiguration> <ParallelExecutor> <ProcessorCountMultiplier>2.0</ProcessorCountMultiplier> </ParallelExecutor> </Configuration>
ue4/distributedbuildtool.txt · 最終更新: by oga
