- recommend to read first
- this post covers
- what does mean each build target
- how to use each build target
- differences of some build targets
- environment
- Windows / 10
- Visual Studio IDE / 2017 Community
overview
- I suppose you already have the unreal engine built from source of 4.21 version
- if you do not, read the
custom-unreal-engine-build
post
- if you do not, read the
- once you build the
UE4
project with optionDevelopment Editor & Win64
- you can find
[EngineRoot]/Engine/Binaries/Win64/UE4Editor.exe
and execute it
- you can find
- in this window, you can create project using your custom engine
- create a
Third Person
template project for testing several build targets in this post
- create a
build-targets
in unreal engine, “build (file)” means the executable file or library file made from source code
- ex1)
UE4Editor-[ProjectName].dll
ofEditor
build target - ex2)
[ProjectName]Client.exe
ofClient
build target - ex3)
[ProjectName].exe
ofGame
build target
- ex1)
there are four build targets frequently used
- Client
- Server
- Game
- Editor
Client
- this target is used for building only client
- it has several features especially displaying screen
- so if the system does not have any graphics API, it cannot be executed
Server
- this target is used for building only server
- it does not have several features especially displaying screen
- so regardless of graphics API, it can be executed
Game
- this target is used for building whole game
- it has all features from
Client
andServer
targets - so a build from this target can be used as client, and server too
- it is not recommended for the commercial game project because user could get the server feature
Editor
- this target is used for executing the game on unreal editor
- only the build from this target can be opened in unreal editor
- also, unreal editor only can open this build, which means packaging impossible
- totally, it has all features from
Game
packaging
- because build files do not contain unreal assets, it cannot be executed alone
- we have checked out what happens when only using a build file in previous post
- so, executing the game from any build file, you need to package unreal assets used in the project file
- and packaging can be done in unreal editor, not the source code editor such as visual studio IDE
- there are some prerequisites for pacakaging the test project
- open the
sln
for the test project and build it withDevelopment Editor & Win64
- and press
F5
to start debugging
- and press
- you would see the
Third Person
default map with unreal editor
- open the
Project Settings
window and findMaps & Modes
tab- set every map with the default map
- find
Packaging
tab- add the default map to the
List of maps to include in a packaged build
- add the default map to the
- write target config files for
Client
andServer
targets
right click
uproject
and selectGenerate project files
re-open the
sln
and build the test project with each solution configurationDevelopment & Win64
Development Client & Win64
Development Server & Win64
now you can see the three build files
open the test project with unreal editor
- way1) double click
uproject
- way2) execute
[EngineRoot]/Engine/Binaries/Win64/UE4Editor.exe
and select the project
- way1) double click
- select
Development
inFile/Package Project/Build Configuration
- select
Windows (64-bit)
inFile/Package Project/Windows
- choose an arbitrary directory for saving the package
- in my case, I created
Packages
folder in project directory and use it
- after packaging, you can see the directory like this
- as we packaged the project with
Development
the executable files are the same
- copy the build files into the
Packages/WindowsNoEditor/[ProjectName]/Binaries/Win64
[ProjectName].exe
[ProjectName]Client.exe
[ProjectName]Server.exe
- run the command prompt and move to the
Packages/WindowsNoEditor/[ProjectName]/Binaries/Win64
- execute each build file with some options for knowing what happens inside
- execute
Game
build file with options-log -windowed resx=720 resy=480
-log
option makes the game print logs-windowed
option prevents the game from running as full-screen
- you can terminate the game
- way1) click
X
on the right of game window - way2) press a grave accent and type
exit
- way1) click
- execute
Client
build file with options-log -windowed resx=720 resy=480
- you can see the same result of
Game
build
- you can see the same result of
- execute
Server
build file with options-log
- you can see there is no game screen with
Server
build
- you can see there is no game screen with
game-client-server
I mentioned
Game
as “it has all features fromClient
andServer
targets”execute
Game
build 3 times with options below-server 127.0.0.1 -log -windowed resx=720 resy=480
127.0.0.1 -log -windowed resx=720 resy=480
127.0.0.1 -log -windowed resx=720 resy=480
the first game acts as (client + server) and other games act as client
- this means
Game target = Client target + Server target
- this means
execute
Server
build with options below127.0.0.1 -log
execute
Client
twice with options below127.0.0.1 -log -windowed resx=720 resy=480
127.0.0.1 -log -windowed resx=720 resy=480
- the first game acts as server and other games act as client
- you can see server do not have a screen