- 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 Codein cpp tab
- then you can see the directory like this
- open the
[ProjectName].slnand check out the csharp files whose name are ending up withTarget.cs - now you may wonder…
- what the
Type = TargetType.Gamemeans - what the heck is
UnrealBuildTool - what is difference between
[ProjectName]Targetand[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
DebugGameandDevelopment: build output is stand-alone binary file, which hasexeextensionDebugGame EditorandDevelopment Editor: build output is dynamic link library, which hasdllextensionShipping: build output is stand-alone binary file, which hasexeextension
- the difference between
DebugGameandDevelopment: the level and depth of debugging featuresDebugGame,DevelopmentandShipping: output ofShippingis 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 Configurationsand what they do - and there is the way to change the behavior of each configuration by editing the
Target.csfiles
- let us change the text
EditorintoGamein[ProjectName]Editor.Target.cs
- remove the
Binariesfolder 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
DebugGameorDevelopment, unreal engine does the build based on[ProjectName].Target.cs - also, when you select
DebugGame EditororDevelopment Editor, unreal engine will build based on[ProjectName]Editor.Target.cs - and the
TypeinTarget.csfile 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
DevelopmentandTest419.Target.cswithType = TargetType.Game - later 5 files are built with
Development EditorandTest419Editor.Target.cswithType = 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
Typevalue, find at this document
- typically, the target file is used for building an unreal server
- at that time, we will use
[ProjectName]Server.Target.cswithType = 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