中EN

UnrealBuildTool (UBT) & Targets

(另含 https://dev.epicgames.com/documentation/en-us/unreal-engine/unreal-engine-build-tool-target-reference)

  • UBT manages the process of building UE source code across a variety of build configurations. Read BuildConfiguration.cs for options.
  • UE is split into many modules. Each module has a .build.cs file ... dependencies, additional libraries, include paths. By default, these modules are compiled into DLLs and loaded by a single executable. You can choose to build a monolithic executable.
  • The build process executes independently of any project files (.sln, .vcproj); a tool generates them (GenerateProjectFiles).
  • Target types: Game (standalone, requires cooked data), Client (no server code), Server (no client code), Editor, Program.
  • Targets declared in .target.cs files under the project root, class deriving from TargetRules; class name = file name + 'Target'. UBT compiles the target file and constructs the class to determine settings.
  • Selected properties: Type; LinkType (monolithic or modular); bUseUnityBuild ("unify C++ code into larger files for faster compilation"); bUseAdaptiveUnityBuild (exclude files being iterated on from unity blobs, using read-only flag for Perforce or git status for Git); bWithLiveCoding; bAllowHotReload; ExtraModuleNames; EnablePlugins/DisablePlugins; DefaultBuildSettings; bWithServerCode/bWithClientCode; NativePointerMemberBehaviorOverride (whether UCLASSes and USTRUCTs may have native pointer members; if disallowed, UHT error, substitute TObjectPtr); bRequireObjectPtrForAddReferencedObjects ("Needed for compatibility with incremental GC").

引用这一章的笔记

输入关键词开始搜索

滚轮或双指缩放 · 拖动平移 · 双击放大 / 还原