- this post covers
- what is the build target in unreal engine
- why we need the several build targets
- environment
- Windows / 10
- Unreal Engine / 4.19.2
- Visual Studio IDE / 2017 Community
overview
- create new project with
Basic Code
in cpp tab
- then you can see the directory like this
- open the
[ProjectName].sln
and check out the csharp files whose name are ending up withTarget.cs
- now you may wonder…
- what the
Type = TargetType.Game
means - what the heck is
UnrealBuildTool
- what is difference between
[ProjectName]Target
and[ProjectName]EditorTarget
- what the
- do not hurry, first of all, we gonna learn about the build targets
solution-configuration
- most of you may have developed the game with no manipulation of
Solution Configurations
- when you folds it out, there are several options and each option is explained in this document detailed
DebugGame
andDevelopment
: build output is stand-alone binary file, which hasexe
extensionDebugGame Editor
andDevelopment Editor
: build output is dynamic link library, which hasdll
extensionShipping
: build output is stand-alone binary file, which hasexe
extension
- the difference between
DebugGame
andDevelopment
: the level and depth of debugging featuresDebugGame
,Development
andShipping
: output ofShipping
is more optimized for the reason of absence of command prompt and screen debug, etc. but, having no assets for the level presentation, both cannot be executed normally
build-target
- yep, you have seen the
Solution Configurations
and what they do - and there is the way to change the behavior of each configuration by editing the
Target.cs
files
- let us change the text
Editor
intoGame
in[ProjectName]Editor.Target.cs
- remove the
Binaries
folder for checking the build output
- build our project with
Development Editor
look at the build output, what happened ? exe file has been generated, not the dll
okay, now I would think it is time to tell you how the build works
- when you select
DebugGame
orDevelopment
, unreal engine does the build based on[ProjectName].Target.cs
- also, when you select
DebugGame Editor
orDevelopment Editor
, unreal engine will build based on[ProjectName]Editor.Target.cs
- and the
Type
inTarget.cs
file is a key value of build configuration, which is read by UnrealBuildTool
- when you select
- as a result, there is no significant difference except for the file names
- first 5 files are built with
Development
andTest419.Target.cs
withType = TargetType.Game
- later 5 files are built with
Development Editor
andTest419Editor.Target.cs
withType = TargetType.Game
- first 5 files are built with
why-it-needed
- this structure can help you customize build configurations
- if you need to build for several enviroments, take care of the target files
- there are many options not only
Type
value, find at this document
- typically, the target file is used for building an unreal server
- at that time, we will use
[ProjectName]Server.Target.cs
withType = TargetType.Server
- because, in the production level, we need a server executing unreal dedicated server
- at that time, we will use
further
- I will write about unreal server build and combination with aws game lift
- in the following contents, this post should be useful for you
- there is a good QnA for these subjects