티스토리 뷰

Programming/Unreal

what-is-unreal-build-target

BaeMinCheon 2019. 7. 31. 23:49

what-is-unreal-build-target

  • 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 with "Target.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"
  • 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" and "Development" : build output is stand-alone binary file, which has "exe" extension
    • "DebugGame Editor" and "Development Editor" : build output is dynamic link library, which has "dll" extension
    • "Shipping" : build output is stand-alone binary file, which has "exe" extension
  • the difference between
    • "DebugGame" and "Development" : the level and depth of debugging features
    • "DebugGame & Development" and "Shipping" : output of "Shipping" 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" into "Game" 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" or "Development", unreal engine does the build based on "[ProjectName].Target.cs"
    • also, when you select "DebugGame Editor" or "Development Editor", unreal engine will build based on "[ProjectName]Editor.Target.cs"
    • and the "Type" in "Target.cs" file is a key value of build configuration, which is read by UnrealBuildTool

  • as a result, there is no significant difference except for the file names
    • first 5 files are built with "Development" and "Test419.Target.cs" with "Type = TargetType.Game"
    • later 5 files are built with "Development Editor" and "Test419Editor.Target.cs" with "Type = TargetType.Game"

why-it-needs

  • 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" with "Type = TargetType.Server"
    • because, in the production level, we need a server executing unreal dedicated server

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

'Programming > Unreal' 카테고리의 다른 글

unreal-visual-studio-debugging  (0) 2019.06.30
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함