UnrealBuildTool supports building several target types:

  • Game - A standalone game which requires cooked data to run.
  • Client - Same as Game, but does not include any server code. Useful for networked games.
  • Server - Same as Game, but does not include any client code. Useful for dedicated servers in networked games.
  • Editor - A target which extends the Unreal Editor.
  • Program - A standalone utility program built on top of the Unreal Engine.

Targets are declared through C# source files with a .target.cs extension, and are stored under your project's Source directory. Each .target.cs file declares a class deriving from the TargetRules base class, and sets properties controlling how it should be built from its constructor. When asked to build a target, UnrealBuildTool will compile your target.cs file and construct the class inside it to determine its settings.

The name of the class must match the name of the file it's declared in followed by 'Target' (so for example, defines the class 'MyProjectTarget').

The typical structure for a target file is as follows.

using UnrealBuildTool;
using System.Collections.Generic;
public class MyProjectTarget : TargetRules
    public MyProjectTarget(TargetInfo Target) : base(Target)
        Type = TargetType.Game;
        // Other properties go here

Read-Only Properties

Name (String)
The name of this target.
Platform (UnrealTargetPlatform)
Platform that this target is being built for.
Configuration (UnrealTargetConfiguration)
The configuration being built.
Architecture (String)
Architecture that the target is being built for (or an empty string for the default).
ProjectFile (FileReference)
Path to the project file for the project containing this target.
Version (ReadOnlyBuildVersion)
The current build version.

Read/Write Properties

AdditionalCompilerArguments (String)
Additional arguments to pass to the compiler
AdditionalLinkerArguments (String)
Additional arguments to pass to the linker
AdditionalPlugins (List<String>)
A list of additional plugins which need to be included in this target. This allows referencing non-optional plugin modules which cannot be disabled, and allows building against specific modules in program targets which do not fit the categories in ModuleHostType.
bAdaptiveUnityDisablesOptimizations (Boolean)
Disable optimization for files that are in the adaptive non-unity working set.
bAdaptiveUnityDisablesPCH (Boolean)
Disables force-included PCHs for files that are in the adaptive non-unity working set.
bAllowASLRInShipping (Boolean)
Whether to allow the use of ASLR (address space layout randomization) if supported. Only applies to shipping builds.
bAllowGeneratedIniWhenCooked (Boolean)
Whether to load generated ini files in cooked build
bAllowLTCG (Boolean)
Whether to allow the use of link time code generation (LTCG).
bAllowRemotelyCompiledPCHs (Boolean)
When enabled, allows XGE to compile pre-compiled header files on remote machines. Otherwise, PCHs are always generated locally.
bBreakBuildOnLicenseViolation (Boolean)
Tells the UBT to break build if module currently being built is violating EULA.
bBuildAllPlugins (Boolean)
Build all the plugins that we can find, even if they're not enabled. This is particularly useful for content- only projects, where you're building the UE4Editor target but running it with a game that enables a plugin.
bBuildDeveloperTools (Boolean)
Whether to compile the developer tools.
bBuildEditor (Boolean)
Whether to compile the editor or not. Only desktop platforms (Windows or Mac) will use this, other platforms force this to false.
bBuildInSolutionByDefault (Nullable<Boolean>)
Whether the target should be included in the default solution build configuration
bBuildRequiresCookedData (Boolean)
Whether to compile code related to building assets. Consoles generally cannot build assets. Desktop platforms generally can.
bBuildWithEditorOnlyData (Boolean)
Whether to compile WITH_EDITORONLY_DATA disabled. Only Windows will use this, other platforms force this to false.
bCheckLicenseViolations (Boolean)
Tells the UBT to check if module currently being built is violating EULA.
bCheckSystemHeadersForModification (Boolean)
Whether headers in system paths should be checked for modification when determining outdated actions.
bCompileAgainstCoreUObject (Boolean)
Enabled for all builds that include the CoreUObject project. Disabled only when building standalone apps that only link with Core.
bCompileAgainstEngine (Boolean)
Enabled for all builds that include the engine project. Disabled only when building standalone apps that only link with Core.
bCompileAPEX (Boolean)
Whether to include PhysX APEX support.
bCompileCEF3 (Boolean)
Whether to compile CEF3 support.
bCompileForSize (Boolean)
True if we want to favor optimizing size over speed.
bCompileFreeType (Boolean)
True if we need FreeType support.
bCompileICU (Boolean)
Whether to include ICU unicode/i18n support in Core.
bCompileLeanAndMeanUE (Boolean)
Whether to compile lean and mean version of UE.
bCompileNvCloth (Boolean)
Whether to include NvCloth.
bCompilePhysX (Boolean)
Whether to include PhysX support.
bCompileRecast (Boolean)
Whether to compile Recast navmesh generation.
bCompileSimplygon (Boolean)
Whether we should compile in support for Simplygon or not.
bCompileSimplygonSSF (Boolean)
Whether we should compile in support for Simplygon's SSF library or not.
bCompileSpeedTree (Boolean)
Whether to compile SpeedTree support.
bCompileWithPluginSupport (Boolean)
Whether to include plugin support.
bCompileWithStatsWithoutEngine (Boolean)
Whether to include stats support even without the engine.
bCopyAppBundleBackToDevice (Boolean)
If true, then a stub IPA will be generated when compiling is done (minimal files needed for a valid IPA).
bCreateMapFile (Boolean)
Outputs a map file as part of the build.
bCreateStubIPA (Boolean)
If true, then a stub IPA will be generated when compiling is done (minimal files needed for a valid IPA).
bDebugBuildsActuallyUseDebugCRT (Boolean)
Enables the debug C++ runtime (CRT) for debug builds. By default we always use the release runtime, since the debug version isn't particularly useful when debugging Unreal Engine projects, and linking against the debug CRT libraries forces our third party library dependencies to also be compiled using the debug CRT (and often perform more slowly). Often it can be inconvenient to require a separate copy of the debug versions of third party static libraries simply so that you can debug your program's code.
bDeployAfterCompile (Boolean)
Whether to deploy the executable after compilation on platforms that require deployment.
bDisableDebugInfo (Boolean)
Whether to globally disable debug info generation; see DebugInfoHeuristics.cs for per-config and per-platform options.
bDisableDebugInfoForGeneratedCode (Boolean)
Whether to disable debug info generation for generated files. This improves link times for modules that have a lot of generated glue code.
bDisableLinking (Boolean)
Whether to disable linking for this target.
bDisableSymbolCache (Boolean)
True if debug symbols that are cached for some platforms should not be created.
bEnableOSX109Support (Boolean)
Whether we should compile with support for OS X 10.9 Mavericks. Used for some tools that we need to be compatible with this version of OS X.
bEnforceIWYU (Boolean)
Enforce "include what you use" rules; warns if monolithic headers (Engine.h, UnrealEd.h, etc...) are used, and checks that source files include their matching header first.
bEventDrivenLoader (Boolean)
If true, event driven loader will be used in cooked builds. @todoio This needs to be replaced by a runtime solution after async loading refactor.
bFlushBuildDirOnRemoteMac (Boolean)
Whether to clean Builds directory on a remote Mac before building.
bForceBuildShaderFormats (Boolean)
Whether to force compiling shader format modules, even if they wouldn't normally be built.
bForceBuildTargetPlatforms (Boolean)
Whether to force compiling the target platform modules, even if they wouldn't normally be built.
bForceCompileDevelopmentAutomationTests (Boolean)
Whether to compile development automation tests.
bForceCompilePerformanceAutomationTests (Boolean)
Whether to compile performance automation tests.
bForceDebugInfo (Boolean)
Whether to force debug info to be generated.
bForceEnableExceptions (Boolean)
Enable exceptions for all modules.
bForceEnableObjCExceptions (Boolean)
Enable exceptions for all modules.
bForceEnableRTTI (Boolean)
Enable RTTI for all modules.
bForcePrecompiledHeaderForGameModules (Boolean)
When enabled, a precompiled header is always generated for game modules, even if there are only a few source files in the module. This greatly improves compile times for iterative changes on a few files in the project, at the expense of slower full rebuild times for small game projects. This can be overridden by setting MinFilesUsingPrecompiledHeaderOverride in a module's Build.cs file.
bForceUnityBuild (Boolean)
Whether to force C++ source files to be combined into larger files for faster compilation.
bFormalBuild (Boolean)
Indicates that this is a formal build, intended for distribution. This flag is automatically set to true when Build.version has a changelist set. The only behavior currently bound to this flag is to compile the default resource file separately for each binary so that the OriginalFilename field is set correctly. By default, we only compile the resource once to reduce build times.
bHasExports (Boolean)
Whether the final executable should export symbols.
bHideSymbolsByDefault (Boolean)
Whether to hide symbols by default on POSIX platforms
bIncludeADO (Boolean)
If true, include ADO database support in core.
bIncludePluginsForTargetPlatforms (Boolean)
Whether to allow plugins which support all target platforms.
bIsBuildingConsoleApplication (Boolean)
True if this is a console application that's being built.
bIWYU (Boolean)
Enables "include what you use" by default for modules in this target. Changes the default PCH mode for any module in this project to PCHUsageModule.UseExplicitOrSharedPCHs.
bLegacyPublicIncludePaths (Boolean)
Add all the public folders as include paths for the compile environment.
bLoggingToMemoryEnabled (Boolean)
Whether to turn on logging to memory for test/shipping builds.
bOmitFramePointers (Boolean)
Whether to omit frame pointers or not. Disabling is useful for e.g. memory profiling on the PC.
bOmitPCDebugInfoInDevelopment (Boolean)
Whether to disable debug info on PC in development builds (for faster developer iteration, as link times are extremely fast with debug info disabled).
bOutputPubliclyDistributable (Boolean)
Whether the output from this target can be publicly distributed, even if it has dependencies on modules that are in folders with special restrictions (eg. CarefullyRedist, NotForLicensees, NoRedist).
bOutputToEngineBinaries (Boolean)
Output the executable to the engine binaries folder.
bPGOOptimize (Boolean)
Whether to optimize this build with Profile Guided Optimization (PGO).
bPGOProfile (Boolean)
Whether to enable Profile Guided Optimization (PGO) instrumentation in this build.
bPrecompile (Boolean)
Make static libraries for all engine modules as intermediates for this target.
bPrintToolChainTimingInfo (Boolean)
Whether to write detailed timing info from the compiler and linker.
bShadowVariableErrors (Boolean)
Forces shadow variable warnings to be treated as errors on platforms that support it.
bShouldCompileAsDLL (Boolean)
Whether this target should be compiled as a DLL. Requires LinkType to be set to TargetLinkType.Monolithic.
bStressTestUnity (Boolean)
Whether to stress test the C++ unity build robustness by including all C++ files files in a project from a single unified file.
bSupportEditAndContinue (Boolean)
Whether to support edit and continue. Only works on Microsoft compilers in 32-bit compiles.
BuildEnvironment (TargetBuildEnvironment)
Specifies the build environment for this target. See TargetBuildEnvironment for more information on the available options.
BuildVersion (String)
The build version string
bUndefinedIdentifierErrors (Boolean)
Forces the use of undefined identifiers in conditional expressions to be treated as errors.
BundleVersion (String)
Bundle version for Mac apps.
bUseAdaptiveUnityBuild (Boolean)
Use a heuristic to determine which files are currently being iterated on and exclude them from unity blobs, result in faster incremental compile times. The current implementation uses the read-only flag to distinguish the working set, assuming that files will be made writable by the source control system if they are being modified. This is true for Perforce, but not for Git.
bUseBackwardsCompatibleDefaults (Boolean)
Whether to use backwards compatible defaults for this module. By default, engine modules always use the latest default settings, while project modules do not (to support an easier migration path).
bUseCacheFreedOSAllocs (Boolean)
Whether to utilize cache freed OS allocs with MallocBinned
bUseCheckedPhysXLibraries (Boolean)
True if Development and Release builds should use the checked configuration of PhysX/APEX. If bUseShippingPhysXLibraries is true, this is ignored.
bUseChecksInShipping (Boolean)
Whether to turn on checks (asserts) for test/shipping builds.
bUseFastMonoCalls (Boolean)
New Monolithic Graphics drivers have optional "fast calls" replacing various D3d functions
bUseFastPDBLinking (Nullable<Boolean>)
Whether to use the :FASTLINK option when building with /DEBUG to create local PDBs on Windows. Fast, but currently seems to have problems finding symbols in the debugger.
bUseFastSemanticsRenderContexts (Boolean)
New Xbox driver supports a "fast semantics" context type. This switches it on for the immediate and deferred contexts Try disabling this if you see rendering issues and/or crashes inthe Xbox RHI.
bUseIncrementalLinking (Boolean)
Whether to use incremental linking or not. Incremental linking can yield faster iteration times when making small changes. Currently disabled by default because it tends to behave a bit buggy on some computers (PDB-related compile errors).
bUseInlining (Boolean)
Enable inlining for all modules.
bUseLauncherChecks (Boolean)
Whether to check that the process was launched through an external launcher.
bUseLoggingInShipping (Boolean)
Whether to turn on logging for test/shipping builds.
bUseMallocProfiler (Boolean)
If true, then enable memory profiling in the build (defines USE_MALLOC_PROFILER=1 and forces bOmitFramePointers=false).
bUsePCHFiles (Boolean)
Whether PCH files should be used.
bUsePDBFiles (Boolean)
Whether PDB files should be used for Visual C++ builds.
bUsePrecompiled (Boolean)
Use existing static libraries for all engine modules in this target.
bUsesCEF3 (Boolean)
Whether the target uses CEF3.
bUseSharedPCHs (Boolean)
Enables "Shared PCHs", a feature which significantly speeds up compile times by attempting to share certain PCH files between modules that UBT detects is including those PCH's header files.
bUseShippingPhysXLibraries (Boolean)
True if Development and Release builds should use the release configuration of PhysX/APEX.
bUsesSlate (Boolean)
Whether the project uses visual Slate UI (as opposed to the low level windowing/messaging, which is always available).
bUseStaticCRT (Boolean)
Forces linking against the static CRT. This is not fully supported across the engine due to the need for allocator implementations to be shared (for example), and TPS libraries to be consistent with each other, but can be used for utility programs.
bUsesSteam (Boolean)
Whether the target uses Steam.
bUseUnityBuild (Boolean)
Whether to unify C++ code into larger files for faster compilation.
bUseXGEController (Boolean)
Whether the XGE controller worker and modules should be included in the engine build. These are required for distributed shader compilation using the XGE interception interface.
bWithPerfCounters (Boolean)
Whether to include PerfCounters support.
bWithServerCode (Boolean)
Compile server-only code.
DisablePlugins (List<String>)
List of plugins to be disabled for this target. Note that the project file may still reference them, so they should be marked as optional to avoid failing to find them at runtime.
EnablePlugins (List<String>)
Additional plugins that should be included for this target.
ExeBinariesSubFolder (String)
Subfolder to place executables in, relative to the default location.
ExtraModuleNames (List<String>)
List of additional modules to be compiled into the target.
GeneratedCodeVersion (EGeneratedCodeVersion)
Allow target module to override UHT code generation version.
GlobalDefinitions (List<String>)
Macros to define globally across the whole target.
MinFilesUsingPrecompiledHeader (Int32)
The minimum number of files that must use a pre-compiled header before it will be created and used.
MinGameModuleSourceFilesForUnityBuild (Int32)
The number of source files in a game module before unity build will be activated for that module. This allows small game modules to have faster iterative compile times for single files, at the expense of slower full rebuild times. This setting can be overridden by the bFasterWithoutUnity option in a module's Build.cs file.
NumIncludedBytesPerUnityCPP (Int32)
An approximate number of bytes of C++ code to target for inclusion in a single unified C++ file.
PakSigningKeysFile (String)
Path to the set of pak signing keys to embed in the executable.
PreBuildSteps (List<String>)
Specifies a list of steps which should be executed before this target is built, in the context of the host platform's shell. The following variables will be expanded before execution: $(EngineDir), $(ProjectDir), $(TargetName), $(TargetPlatform), $(TargetConfiguration), $(TargetType), $(ProjectFile).
PostBuildSteps (List<String>)
Specifies a list of steps which should be executed after this target is built, in the context of the host platform's shell. The following variables will be expanded before execution: $(EngineDir), $(ProjectDir), $(TargetName), $(TargetPlatform), $(TargetConfiguration), $(TargetType), $(ProjectFile).
ProjectDefinitions (List<String>)
Macros to define across all macros in the project.
SolutionDirectory (String)
Allows a Program Target to specify it's own solution folder path.
ToolChainName (String)
Allows overriding the toolchain to be created for this target. This must match the name of a class declared in the UnrealBuildTool assembly.
Type (TargetType)
The type of target.
UndecoratedConfiguration (UnrealTargetConfiguration)
Specifies the configuration whose binaries do not require a "-Platform-Configuration" suffix.